Skip to content

Commit

Permalink
fix: addressing minor performance concerns with the prettier plugin (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
erunion authored Jun 1, 2023
1 parent 19871f1 commit d70712a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
23 changes: 13 additions & 10 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ module.exports = {
'plugin:import/errors',
'plugin:import/warnings',
'plugin:you-dont-need-lodash-underscore/compatible',
'prettier',
'prettier/prettier',
'plugin:prettier/recommended', // This has to be the last rule added.
],
plugins: ['eslint-comments', 'import', 'node', 'prettier', 'unicorn'],
plugins: ['node', 'unicorn'],
rules: {
'arrow-body-style': 'off',

'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
'eslint-comments/no-unused-disable': 'error',

Expand All @@ -26,13 +23,13 @@ module.exports = {
'import/order': [
'error',
{
'alphabetize': {
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
'groups': ['type', 'builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
groups: ['type', 'builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
'newlines-between': 'always',
'warnOnUnassignedImports': true,
warnOnUnassignedImports: true,
},
],

Expand All @@ -56,11 +53,17 @@ module.exports = {

'prefer-destructuring': 'off',

'prettier/prettier': ['error', prettierConfig],
'prettier/prettier': [
'error',
prettierConfig,
{
usePrettierrc: false,
},
],

// The `eslint-config-airbnb-base` that we extend off of doesn't have any rules for catching for
// templated strings that aren't templates.
'quotes': ['error', 'single', { avoidEscape: true }],
quotes: ['error', 'single', { avoidEscape: true }],

'unicorn/catch-error-name': ['error', { ignore: ['^(error|err|e)$'] }],
// "unicorn/consistent-function-scoping": "error", // Maybe?
Expand Down
3 changes: 1 addition & 2 deletions packages/eslint-config/react.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module.exports = {
extends: ['plugin:jsx-a11y/recommended', 'plugin:react/recommended', 'plugin:react-hooks/recommended'],
plugins: ['jsx-a11y', 'react'],
env: {
browser: true,
},
Expand All @@ -10,7 +9,7 @@ module.exports = {
extensions: ['.js', '.jsx'],
},
},
'react': {
react: {
version: 'detect',
},
},
Expand Down

0 comments on commit d70712a

Please sign in to comment.