Skip to content

Commit ab66d35

Browse files
committed
more changes
1 parent 2c777fb commit ab66d35

File tree

2 files changed

+53
-70
lines changed

2 files changed

+53
-70
lines changed

codeclimateEslintRules.js

Lines changed: 52 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,66 @@
1-
{
2-
"plugins": [
3-
"html",
4-
"json",
5-
"babel",
6-
"react-hooks"
7-
],
8-
"extends": [
9-
"airbnb",
10-
"plugin:prettier/recommended",
11-
"prettier/react",
12-
"plugin:jest/recommended"
13-
],
14-
"rules": {
15-
"prettier/prettier": [
16-
"warn",
1+
module.exports = {
2+
plugins: ['html', 'json', 'babel', 'react-hooks'],
3+
extends: ['airbnb', 'plugin:prettier/recommended', 'prettier/react', 'plugin:jest/recommended'],
4+
rules: {
5+
'prettier/prettier': [
6+
'warn',
177
{
18-
"printWidth": 100,
19-
"singleQuote": true,
20-
"trailingComma": "es5",
21-
"semi": false
22-
}
8+
printWidth: 100,
9+
singleQuote: true,
10+
trailingComma: 'es5',
11+
semi: false,
12+
},
2313
],
24-
"arrow-parens": [
25-
1,
26-
"as-needed"
27-
],
28-
"no-console": "off",
29-
"no-param-reassign": "off",
30-
"no-plusplus": "off",
31-
"no-unused-expressions": [
32-
"warn",
14+
'arrow-parens': [1, 'as-needed'],
15+
'no-console': 'off',
16+
'no-param-reassign': 'off',
17+
'no-plusplus': 'off',
18+
'no-unused-expressions': [
19+
'warn',
3320
{
34-
"allowShortCircuit": true
35-
}
21+
allowShortCircuit: true,
22+
},
3623
],
37-
"no-use-before-define": [
38-
"error",
24+
'no-use-before-define': [
25+
'error',
3926
{
40-
"functions": false,
41-
"classes": true,
42-
"variables": true
43-
}
27+
functions: false,
28+
classes: true,
29+
variables: true,
30+
},
4431
],
45-
"no-warning-comments": 1,
46-
"prefer-destructuring": "off",
47-
"import/no-extraneous-dependencies": [
48-
"error",
32+
'no-warning-comments': 1,
33+
'prefer-destructuring': 'off',
34+
'import/no-extraneous-dependencies': [
35+
'error',
4936
{
50-
"devDependencies": [
51-
"**/*.stories.js",
52-
"**/*.test.js",
53-
"**/demo/**"
54-
]
55-
}
37+
devDependencies: ['**/*.stories.js', '**/*.test.js', '**/demo/**'],
38+
},
5639
],
57-
"jsx-a11y/label-has-for": 0,
58-
"jsx-a11y/label-has-associated-control": [
40+
'jsx-a11y/label-has-for': 0,
41+
'jsx-a11y/label-has-associated-control': [
5942
2,
6043
{
61-
"assert": "either"
62-
}
44+
assert: 'either',
45+
},
6346
],
64-
"react/prop-types": "off",
65-
"react/jsx-filename-extension": "off",
66-
"react/require-default-props": "off",
67-
"react-hooks/rules-of-hooks": "error",
68-
"react-hooks/exhaustive-deps": "warn",
69-
"jest/no-large-snapshots": "error"
47+
'react/prop-types': 'off',
48+
'react/jsx-filename-extension': 'off',
49+
'react/require-default-props': 'off',
50+
'react-hooks/rules-of-hooks': 'error',
51+
'react-hooks/exhaustive-deps': 'warn',
52+
'jest/no-large-snapshots': 'error',
7053
},
71-
"env": {
72-
"es6": true,
73-
"browser": true
54+
env: {
55+
es6: true,
56+
browser: true,
7457
},
75-
"parserOptions": {
76-
"ecmaVersion": 2018,
77-
"sourceType": "module",
78-
"ecmaFeatures": {
79-
"jsx": true
80-
}
58+
parserOptions: {
59+
ecmaVersion: 2018,
60+
sourceType: 'module',
61+
ecmaFeatures: {
62+
jsx: true,
63+
},
8164
},
82-
"parser": "babel-eslint"
83-
}
65+
parser: 'babel-eslint',
66+
}

combineRules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ configsToCombine.forEach(config => {
3535

3636
fs.writeFileSync(
3737
path.join(process.cwd(), 'codeclimateEslintRules.js'),
38-
`module.exports = {\n${JSON.stringify(codeclimateConfig, null, 2)}\n}`
38+
`module.exports = ${JSON.stringify(codeclimateConfig, null, 2)}`
3939
)

0 commit comments

Comments
 (0)