eslint-config-tamia 7.2.6 → 8.0.1
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/Readme.md +1 -2
- package/package.json +10 -9
- package/react.js +11 -1
- package/rules/es6.js +1 -0
- package/rules/typescript.js +40 -48
package/Readme.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# eslint-config-tamia
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/eslint-config-tamia)
|
|
3
|
+
[](https://www.npmjs.com/package/eslint-config-tamia) [](https://github.com/tamiadev/eslint-config-tamia/actions)
|
|
5
4
|
|
|
6
5
|
This package provides [Tâmia’s](http://tamiadev.github.io/tamia/) `.eslintrc` as an extensible shared config. Based on [eslint-config-airbnb](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb).
|
|
7
6
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-tamia",
|
|
3
3
|
"description": "Tâmia ESLint config",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "8.0.1",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"pretest": "npm run lint",
|
|
@@ -33,15 +33,16 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/tamiadev/eslint-config-tamia",
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"
|
|
39
|
-
"eslint": "
|
|
40
|
-
"eslint
|
|
41
|
-
"
|
|
42
|
-
"
|
|
36
|
+
"@babel/eslint-parser": "^7.17.0",
|
|
37
|
+
"@babel/preset-react": "^7.16.7",
|
|
38
|
+
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
|
39
|
+
"@typescript-eslint/parser": "^5.21.0",
|
|
40
|
+
"eslint": "^8.14.0",
|
|
41
|
+
"eslint-plugin-react": "^7.29.4",
|
|
42
|
+
"jest": "^28.0.2",
|
|
43
|
+
"react": "^18.1.0"
|
|
43
44
|
},
|
|
44
45
|
"peerDependencies": {
|
|
45
|
-
"eslint": ">=
|
|
46
|
+
"eslint": ">=8"
|
|
46
47
|
}
|
|
47
48
|
}
|
package/react.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
extends: ['./legacy', './rules/es6', './rules/strict', './rules/react'].map(
|
|
2
|
+
extends: ['./legacy', './rules/es6', './rules/strict', './rules/react'].map(
|
|
3
|
+
require.resolve
|
|
4
|
+
),
|
|
5
|
+
parserOptions: {
|
|
6
|
+
ecmaVersion: 2020,
|
|
7
|
+
sourceType: 'module',
|
|
8
|
+
requireConfigFile: false,
|
|
9
|
+
babelOptions: {
|
|
10
|
+
presets: ['@babel/preset-react'],
|
|
11
|
+
},
|
|
12
|
+
},
|
|
3
13
|
rules: {},
|
|
4
14
|
};
|
package/rules/es6.js
CHANGED
package/rules/typescript.js
CHANGED
|
@@ -5,29 +5,27 @@ module.exports = {
|
|
|
5
5
|
'@typescript-eslint/adjacent-overload-signatures': 'error',
|
|
6
6
|
'@typescript-eslint/array-type': 'error',
|
|
7
7
|
'@typescript-eslint/ban-types': 'error',
|
|
8
|
-
'@typescript-eslint/naming-convention': [
|
|
8
|
+
'@typescript-eslint/naming-convention': [
|
|
9
|
+
'error',
|
|
9
10
|
{
|
|
10
11
|
selector: 'default',
|
|
11
|
-
format: ['camelCase']
|
|
12
|
+
format: ['camelCase'],
|
|
12
13
|
},
|
|
13
14
|
{
|
|
14
15
|
selector: 'variableLike',
|
|
15
|
-
format: ['camelCase', 'PascalCase', 'UPPER_CASE']
|
|
16
|
+
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
|
|
16
17
|
},
|
|
17
18
|
{
|
|
18
19
|
selector: 'property',
|
|
19
|
-
format:
|
|
20
|
-
leadingUnderscore: 'allow',
|
|
20
|
+
format: null,
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
selector: 'typeLike',
|
|
24
|
-
format: ['PascalCase']
|
|
24
|
+
format: ['PascalCase'],
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
filter: '^__html$',
|
|
30
|
-
format: null,
|
|
27
|
+
selector: 'enumMember',
|
|
28
|
+
format: ['PascalCase', 'UPPER_CASE'],
|
|
31
29
|
},
|
|
32
30
|
{
|
|
33
31
|
// Unused function argument
|
|
@@ -35,12 +33,6 @@ module.exports = {
|
|
|
35
33
|
filter: '^_$',
|
|
36
34
|
format: null,
|
|
37
35
|
},
|
|
38
|
-
{
|
|
39
|
-
// Quoted property names
|
|
40
|
-
selector: 'property',
|
|
41
|
-
filter: '[^a-zA-Z0-9_]',
|
|
42
|
-
format: null,
|
|
43
|
-
},
|
|
44
36
|
],
|
|
45
37
|
'@typescript-eslint/explicit-member-accessibility': 'error',
|
|
46
38
|
'@typescript-eslint/consistent-type-assertions': 'error',
|
|
@@ -60,38 +52,38 @@ module.exports = {
|
|
|
60
52
|
},
|
|
61
53
|
overrides: [
|
|
62
54
|
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
55
|
+
files: ['*.ts', '*.tsx'],
|
|
56
|
+
rules: {
|
|
57
|
+
// Disable generic rules that conflict with TypeScript
|
|
58
|
+
camelcase: 'off',
|
|
59
|
+
'no-array-constructor': 'off',
|
|
60
|
+
'no-unused-vars': 'off',
|
|
61
|
+
'no-unused-expressions': 'off',
|
|
62
|
+
'no-use-before-define': 'off',
|
|
71
63
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
64
|
+
//Checked by Typescript - ts(2378)
|
|
65
|
+
'getter-return': 'off',
|
|
66
|
+
// Checked by Typescript - ts(2300)
|
|
67
|
+
'no-dupe-args': 'off',
|
|
68
|
+
// Checked by Typescript - ts(1117)
|
|
69
|
+
'no-dupe-keys': 'off',
|
|
70
|
+
// Checked by Typescript - ts(7027)
|
|
71
|
+
'no-unreachable': 'off',
|
|
72
|
+
// Checked by Typescript - ts(2367)
|
|
73
|
+
'valid-typeof': 'off',
|
|
74
|
+
// Checked by Typescript - ts(2588)
|
|
75
|
+
'no-const-assign': 'off',
|
|
76
|
+
// Checked by Typescript - ts(2588)
|
|
77
|
+
'no-new-symbol': 'off',
|
|
78
|
+
// Checked by Typescript - ts(2376)
|
|
79
|
+
'no-this-before-super': 'off',
|
|
80
|
+
// This is checked by Typescript using the option `strictNullChecks`.
|
|
81
|
+
'no-undef': 'off',
|
|
82
|
+
// This is already checked by Typescript.
|
|
83
|
+
'no-dupe-class-members': 'off',
|
|
84
|
+
// This is already checked by Typescript.
|
|
85
|
+
'no-redeclare': 'off',
|
|
86
|
+
},
|
|
95
87
|
},
|
|
96
|
-
|
|
88
|
+
],
|
|
97
89
|
};
|