@viclafouch/eslint-config-viclafouch 3.0.1 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +21 -11
- package/package.json +36 -17
- package/typescript.js +18 -0
package/.eslintrc.js
CHANGED
|
@@ -7,14 +7,20 @@ module.exports = {
|
|
|
7
7
|
'plugin:jsx-a11y/recommended',
|
|
8
8
|
'plugin:prettier/recommended'
|
|
9
9
|
],
|
|
10
|
-
|
|
10
|
+
env: {
|
|
11
|
+
browser: true,
|
|
12
|
+
es6: true,
|
|
13
|
+
node: true
|
|
14
|
+
},
|
|
15
|
+
parser: '@babel/eslint-parser',
|
|
11
16
|
settings: {
|
|
12
17
|
react: {
|
|
13
18
|
version: 'detect'
|
|
14
19
|
}
|
|
15
20
|
},
|
|
16
21
|
parserOptions: {
|
|
17
|
-
|
|
22
|
+
requireConfigFile: false,
|
|
23
|
+
ecmaVersion: 'latest',
|
|
18
24
|
sourceType: 'module',
|
|
19
25
|
ecmaFeatures: {
|
|
20
26
|
jsx: true
|
|
@@ -23,6 +29,13 @@ module.exports = {
|
|
|
23
29
|
rules: {
|
|
24
30
|
'react/prop-types': 'off',
|
|
25
31
|
'simple-import-sort/imports': 'error',
|
|
32
|
+
'react/jsx-props-no-spreading': 0,
|
|
33
|
+
'import/prefer-default-export': 0,
|
|
34
|
+
'arrow-body-style': ['error', 'always'],
|
|
35
|
+
'react/function-component-definition': [
|
|
36
|
+
2,
|
|
37
|
+
{ namedComponents: 'arrow-function' }
|
|
38
|
+
],
|
|
26
39
|
'prettier/prettier': [
|
|
27
40
|
'error',
|
|
28
41
|
{
|
|
@@ -32,13 +45,15 @@ module.exports = {
|
|
|
32
45
|
tabWidth: 2,
|
|
33
46
|
jsxSingleQuote: false,
|
|
34
47
|
trailingComma: 'none',
|
|
35
|
-
|
|
48
|
+
endOfLine: 'auto',
|
|
49
|
+
bracketSameLine: false,
|
|
50
|
+
arrowParens: 'always'
|
|
36
51
|
}
|
|
37
52
|
]
|
|
38
53
|
},
|
|
39
54
|
overrides: [
|
|
40
55
|
{
|
|
41
|
-
files: ['*.jsx', '*.js'],
|
|
56
|
+
files: ['*.jsx', '*.js', '*.ts', '*.tsx'],
|
|
42
57
|
rules: {
|
|
43
58
|
'simple-import-sort/imports': [
|
|
44
59
|
'error',
|
|
@@ -46,7 +61,7 @@ module.exports = {
|
|
|
46
61
|
groups: [
|
|
47
62
|
// Packages. `react` related packages come first.
|
|
48
63
|
// Things that start with a letter (or digit or underscore), or `@` followed by a letter.
|
|
49
|
-
['^react', '^@?\\w'],
|
|
64
|
+
['^react', '^next', '^@mui(/.*|$)', '^@?\\w'],
|
|
50
65
|
// Absolute imports and Relative imports.
|
|
51
66
|
[
|
|
52
67
|
'^(utils|services|hooks|hoc|types|contexts|dictionary|components)(/.*|$)',
|
|
@@ -59,10 +74,5 @@ module.exports = {
|
|
|
59
74
|
]
|
|
60
75
|
}
|
|
61
76
|
}
|
|
62
|
-
]
|
|
63
|
-
env: {
|
|
64
|
-
browser: true,
|
|
65
|
-
es6: true,
|
|
66
|
-
node: true
|
|
67
|
-
}
|
|
77
|
+
]
|
|
68
78
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viclafouch/eslint-config-viclafouch",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "ESLint and Prettier Config from Victor de la Fouchardiere",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"javascript",
|
|
8
8
|
"ecmascript",
|
|
9
|
+
"typescript",
|
|
9
10
|
"eslint",
|
|
10
|
-
"lint",
|
|
11
11
|
"config",
|
|
12
12
|
"prettier"
|
|
13
13
|
],
|
|
@@ -15,33 +15,52 @@
|
|
|
15
15
|
"type": "git",
|
|
16
16
|
"url": "git+https://github.com/viclafouch/eslint-config-viclafouch.git"
|
|
17
17
|
},
|
|
18
|
+
"standard-version": {
|
|
19
|
+
"skip": {
|
|
20
|
+
"changelog": true
|
|
21
|
+
}
|
|
22
|
+
},
|
|
18
23
|
"author": "Victor de la Fouchardiere <victor.delafouchardiere@gmail.com>",
|
|
19
24
|
"license": "MIT",
|
|
20
25
|
"homepage": "https://github.com/viclafouch/eslint-config-viclafouch#readme",
|
|
21
26
|
"peerDependencies": {
|
|
22
|
-
"babel
|
|
23
|
-
"eslint": "
|
|
27
|
+
"@babel/core": "7.16.0",
|
|
28
|
+
"@babel/eslint-parser": "7.16.3",
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "5.4.0",
|
|
30
|
+
"@typescript-eslint/parser": "5.4.0",
|
|
31
|
+
"eslint": "8.3.0",
|
|
32
|
+
"eslint-config-airbnb": "19.0.1",
|
|
24
33
|
"eslint-config-prettier": "^8.3.0",
|
|
25
|
-
"eslint-plugin-
|
|
26
|
-
"eslint-plugin-
|
|
27
|
-
"eslint-plugin-
|
|
28
|
-
"eslint-plugin-react
|
|
34
|
+
"eslint-plugin-import": "2.25.3",
|
|
35
|
+
"eslint-plugin-jsx-a11y": "6.5.1",
|
|
36
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
37
|
+
"eslint-plugin-react": "7.27.1",
|
|
38
|
+
"eslint-plugin-react-hooks": "4.3.0",
|
|
29
39
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
30
|
-
"prettier": "^2.
|
|
40
|
+
"prettier": "^2.5.0",
|
|
41
|
+
"typescript": "4.5.2"
|
|
31
42
|
},
|
|
32
43
|
"devDependencies": {
|
|
33
|
-
"babel
|
|
34
|
-
"eslint": "
|
|
44
|
+
"@babel/core": "7.16.0",
|
|
45
|
+
"@babel/eslint-parser": "7.16.3",
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "5.4.0",
|
|
47
|
+
"@typescript-eslint/parser": "5.4.0",
|
|
48
|
+
"eslint": "8.3.0",
|
|
49
|
+
"eslint-config-airbnb": "19.0.1",
|
|
35
50
|
"eslint-config-prettier": "^8.3.0",
|
|
36
|
-
"eslint-plugin-
|
|
37
|
-
"eslint-plugin-
|
|
38
|
-
"eslint-plugin-
|
|
39
|
-
"eslint-plugin-react
|
|
51
|
+
"eslint-plugin-import": "2.25.3",
|
|
52
|
+
"eslint-plugin-jsx-a11y": "6.5.1",
|
|
53
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
54
|
+
"eslint-plugin-react": "7.27.1",
|
|
55
|
+
"eslint-plugin-react-hooks": "4.3.0",
|
|
40
56
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
41
|
-
"prettier": "^2.
|
|
57
|
+
"prettier": "^2.5.0",
|
|
58
|
+
"standard-version": "9.3.2",
|
|
59
|
+
"typescript": "4.5.2"
|
|
42
60
|
},
|
|
43
61
|
"scripts": {
|
|
44
62
|
"lint": "eslint .",
|
|
45
|
-
"lint:fix": "eslint --fix"
|
|
63
|
+
"lint:fix": "eslint --fix",
|
|
64
|
+
"release": "standard-version"
|
|
46
65
|
}
|
|
47
66
|
}
|
package/typescript.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: [
|
|
3
|
+
'airbnb',
|
|
4
|
+
'airbnb-typescript',
|
|
5
|
+
'airbnb/hooks',
|
|
6
|
+
'plugin:@typescript-eslint/recommended',
|
|
7
|
+
'plugin:prettier/recommended',
|
|
8
|
+
'./.eslintrc.js'
|
|
9
|
+
],
|
|
10
|
+
parser: '@typescript-eslint/parser',
|
|
11
|
+
plugins: ['react', '@typescript-eslint', 'simple-import-sort'],
|
|
12
|
+
rules: {
|
|
13
|
+
'@typescript-eslint/ban-ts-comment': 'off'
|
|
14
|
+
},
|
|
15
|
+
parserOptions: {
|
|
16
|
+
project: './tsconfig.json'
|
|
17
|
+
}
|
|
18
|
+
}
|