Skip to content

Commit d70712a

Browse files
authored
fix: addressing minor performance concerns with the prettier plugin (#684)
1 parent 19871f1 commit d70712a

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

packages/eslint-config/index.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@ module.exports = {
88
'plugin:import/errors',
99
'plugin:import/warnings',
1010
'plugin:you-dont-need-lodash-underscore/compatible',
11-
'prettier',
12-
'prettier/prettier',
11+
'plugin:prettier/recommended', // This has to be the last rule added.
1312
],
14-
plugins: ['eslint-comments', 'import', 'node', 'prettier', 'unicorn'],
13+
plugins: ['node', 'unicorn'],
1514
rules: {
16-
'arrow-body-style': 'off',
17-
1815
'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
1916
'eslint-comments/no-unused-disable': 'error',
2017

@@ -26,13 +23,13 @@ module.exports = {
2623
'import/order': [
2724
'error',
2825
{
29-
'alphabetize': {
26+
alphabetize: {
3027
order: 'asc',
3128
caseInsensitive: true,
3229
},
33-
'groups': ['type', 'builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
30+
groups: ['type', 'builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
3431
'newlines-between': 'always',
35-
'warnOnUnassignedImports': true,
32+
warnOnUnassignedImports: true,
3633
},
3734
],
3835

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

5754
'prefer-destructuring': 'off',
5855

59-
'prettier/prettier': ['error', prettierConfig],
56+
'prettier/prettier': [
57+
'error',
58+
prettierConfig,
59+
{
60+
usePrettierrc: false,
61+
},
62+
],
6063

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

6568
'unicorn/catch-error-name': ['error', { ignore: ['^(error|err|e)$'] }],
6669
// "unicorn/consistent-function-scoping": "error", // Maybe?

packages/eslint-config/react.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
module.exports = {
22
extends: ['plugin:jsx-a11y/recommended', 'plugin:react/recommended', 'plugin:react-hooks/recommended'],
3-
plugins: ['jsx-a11y', 'react'],
43
env: {
54
browser: true,
65
},
@@ -10,7 +9,7 @@ module.exports = {
109
extensions: ['.js', '.jsx'],
1110
},
1211
},
13-
'react': {
12+
react: {
1413
version: 'detect',
1514
},
1615
},

0 commit comments

Comments
 (0)