@joondeveloper/eslint-config 0.0.3 → 0.1.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/base.js +45 -0
- package/next.js +26 -23
- package/node.js +6 -9
- package/package.json +15 -25
- package/react.js +16 -35
package/base.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
env: {
|
|
3
|
+
es2021: true,
|
|
4
|
+
},
|
|
5
|
+
|
|
6
|
+
parser: '@typescript-eslint/parser',
|
|
7
|
+
|
|
8
|
+
parserOptions: {
|
|
9
|
+
ecmaVersion: 'latest',
|
|
10
|
+
sourceType: 'module',
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
plugins: ['@typescript-eslint'],
|
|
14
|
+
|
|
15
|
+
extends: [
|
|
16
|
+
'standard',
|
|
17
|
+
'plugin:@typescript-eslint/recommended',
|
|
18
|
+
'plugin:prettier/recommended',
|
|
19
|
+
],
|
|
20
|
+
|
|
21
|
+
rules: {
|
|
22
|
+
'prettier/prettier': [
|
|
23
|
+
'error',
|
|
24
|
+
{
|
|
25
|
+
printWidth: 80,
|
|
26
|
+
tabWidth: 2,
|
|
27
|
+
singleQuote: true,
|
|
28
|
+
trailingComma: 'all',
|
|
29
|
+
arrowParens: 'always',
|
|
30
|
+
semi: false,
|
|
31
|
+
endOfLine: 'auto',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
|
|
35
|
+
'@typescript-eslint/consistent-type-imports': 'error',
|
|
36
|
+
'@typescript-eslint/no-floating-promises': 'error',
|
|
37
|
+
'@typescript-eslint/no-misused-promises': 'error',
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
settings: {
|
|
41
|
+
'import/parsers': {
|
|
42
|
+
[require.resolve('@typescript-eslint/parser')]: ['.ts', '.tsx', '.d.ts'],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
}
|
package/next.js
CHANGED
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
+
extends: [
|
|
3
|
+
'./react',
|
|
4
|
+
'next/core-web-vitals',
|
|
5
|
+
],
|
|
6
|
+
|
|
2
7
|
env: {
|
|
3
8
|
browser: true,
|
|
4
9
|
es2021: true,
|
|
5
10
|
jest: true,
|
|
6
11
|
},
|
|
7
|
-
|
|
8
|
-
'standard',
|
|
9
|
-
'plugin:@typescript-eslint/recommended',
|
|
10
|
-
'plugin:prettier/recommended',
|
|
11
|
-
],
|
|
12
|
-
parser: '@typescript-eslint/parser',
|
|
12
|
+
|
|
13
13
|
parserOptions: {
|
|
14
14
|
ecmaFeatures: {
|
|
15
|
-
jsx: true
|
|
15
|
+
jsx: true,
|
|
16
16
|
},
|
|
17
17
|
ecmaVersion: 'latest',
|
|
18
|
-
sourceType: 'module'
|
|
18
|
+
sourceType: 'module',
|
|
19
19
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
],
|
|
20
|
+
|
|
21
|
+
plugins: ['jsx-a11y', '@typescript-eslint'],
|
|
22
|
+
|
|
24
23
|
rules: {
|
|
25
|
-
'prettier/prettier': [
|
|
26
|
-
'
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
'prettier/prettier': [
|
|
25
|
+
'error',
|
|
26
|
+
{
|
|
27
|
+
printWidth: 80,
|
|
28
|
+
tabWidth: 2,
|
|
29
|
+
singleQuote: true,
|
|
30
|
+
trailingComma: 'all',
|
|
31
|
+
arrowParens: 'always',
|
|
32
|
+
semi: false,
|
|
33
|
+
endOfLine: 'auto',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
34
36
|
'jsx-a11y/alt-text': [
|
|
35
37
|
'warn',
|
|
36
38
|
{
|
|
@@ -45,6 +47,7 @@ module.exports = {
|
|
|
45
47
|
'jsx-a11y/role-supports-aria-props': 'warn',
|
|
46
48
|
'react/no-unknown-property': 'error',
|
|
47
49
|
},
|
|
50
|
+
|
|
48
51
|
settings: {
|
|
49
52
|
react: {
|
|
50
53
|
version: 'detect',
|
|
@@ -52,5 +55,5 @@ module.exports = {
|
|
|
52
55
|
'import/parsers': {
|
|
53
56
|
[require.resolve('@typescript-eslint/parser')]: ['.ts', '.tsx', '.d.ts'],
|
|
54
57
|
},
|
|
55
|
-
}
|
|
56
|
-
}
|
|
58
|
+
},
|
|
59
|
+
}
|
package/node.js
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
+
extends: ['./base'],
|
|
3
|
+
|
|
2
4
|
env: {
|
|
3
|
-
es2021: true,
|
|
4
5
|
node: true,
|
|
5
6
|
},
|
|
6
|
-
|
|
7
|
-
parser: '@typescript-eslint/parser',
|
|
8
|
-
parserOptions: {
|
|
9
|
-
ecmaVersion: 'latest',
|
|
10
|
-
sourceType: 'module',
|
|
11
|
-
},
|
|
12
|
-
plugins: ['@typescript-eslint'],
|
|
7
|
+
|
|
13
8
|
rules: {
|
|
14
9
|
'prettier/prettier': [
|
|
15
10
|
'error',
|
|
@@ -20,12 +15,14 @@ module.exports = {
|
|
|
20
15
|
trailingComma: 'all',
|
|
21
16
|
arrowParens: 'always',
|
|
22
17
|
semi: false,
|
|
18
|
+
endOfLine: 'auto',
|
|
23
19
|
},
|
|
24
20
|
],
|
|
25
21
|
},
|
|
22
|
+
|
|
26
23
|
settings: {
|
|
27
24
|
'import/parsers': {
|
|
28
25
|
[require.resolve('@typescript-eslint/parser')]: ['.ts', '.tsx', '.d.ts'],
|
|
29
26
|
},
|
|
30
27
|
},
|
|
31
|
-
}
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,35 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@joondeveloper/eslint-config",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"private": false,
|
|
5
|
-
"description": "Configuração do ESLint",
|
|
6
|
-
"main": "index.js",
|
|
3
|
+
"version": "0.1.1",
|
|
7
4
|
"license": "MIT",
|
|
8
|
-
"
|
|
9
|
-
"url": "joaomjbraga/eslint-config-joondeveloper"
|
|
10
|
-
},
|
|
5
|
+
"main": "base.js",
|
|
11
6
|
"peerDependencies": {
|
|
12
|
-
"eslint": "^8
|
|
13
|
-
"typescript": ">=5"
|
|
14
|
-
|
|
15
|
-
"peerDependenciesMeta": {
|
|
16
|
-
"typescript": {
|
|
17
|
-
"optional": true
|
|
18
|
-
}
|
|
7
|
+
"eslint": "^8 || ^9",
|
|
8
|
+
"typescript": ">=5",
|
|
9
|
+
"prettier": "^3"
|
|
19
10
|
},
|
|
20
11
|
"dependencies": {
|
|
21
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
22
|
-
"@typescript-eslint/parser": "^
|
|
23
|
-
"eslint": "^8.56.0",
|
|
12
|
+
"@typescript-eslint/eslint-plugin": "^8.18.2",
|
|
13
|
+
"@typescript-eslint/parser": "^8.18.2",
|
|
24
14
|
"eslint-config-prettier": "^9.1.0",
|
|
25
15
|
"eslint-config-standard": "^17.1.0",
|
|
26
|
-
"eslint-plugin-import": "^2.
|
|
27
|
-
"eslint-plugin-
|
|
28
|
-
"eslint-plugin-
|
|
29
|
-
"eslint-plugin-prettier": "^5.1
|
|
30
|
-
"eslint-plugin-
|
|
31
|
-
"eslint-plugin-react": "^
|
|
32
|
-
"eslint-plugin-
|
|
33
|
-
"prettier": "^3.2
|
|
16
|
+
"eslint-plugin-import": "^2.31.0",
|
|
17
|
+
"eslint-plugin-n": "^17.14.0",
|
|
18
|
+
"eslint-plugin-promise": "^7.2.1",
|
|
19
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
20
|
+
"eslint-plugin-react": "^7.37.2",
|
|
21
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
|
22
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
23
|
+
"prettier": "^3.4.2"
|
|
34
24
|
}
|
|
35
25
|
}
|
package/react.js
CHANGED
|
@@ -1,42 +1,29 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
env: {
|
|
3
|
-
browser: true,
|
|
4
|
-
es2021: true,
|
|
5
|
-
jest: true,
|
|
6
|
-
},
|
|
7
2
|
extends: [
|
|
3
|
+
'./base',
|
|
8
4
|
'plugin:react/recommended',
|
|
9
5
|
'plugin:react-hooks/recommended',
|
|
10
|
-
'
|
|
11
|
-
'plugin:@typescript-eslint/recommended',
|
|
12
|
-
'plugin:prettier/recommended',
|
|
6
|
+
'plugin:jsx-a11y/recommended',
|
|
13
7
|
],
|
|
14
|
-
|
|
8
|
+
|
|
9
|
+
env: {
|
|
10
|
+
browser: true,
|
|
11
|
+
jest: true,
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
plugins: ['react', 'jsx-a11y'],
|
|
15
|
+
|
|
15
16
|
parserOptions: {
|
|
16
17
|
ecmaFeatures: {
|
|
17
|
-
jsx: true
|
|
18
|
+
jsx: true,
|
|
18
19
|
},
|
|
19
|
-
ecmaVersion: 'latest',
|
|
20
|
-
sourceType: 'module'
|
|
21
20
|
},
|
|
22
|
-
|
|
23
|
-
'react',
|
|
24
|
-
'jsx-a11y',
|
|
25
|
-
'@typescript-eslint'
|
|
26
|
-
],
|
|
21
|
+
|
|
27
22
|
rules: {
|
|
28
|
-
"react/self-closing-comp": "error",
|
|
29
|
-
'prettier/prettier': ["error", {
|
|
30
|
-
'printWidth': 80,
|
|
31
|
-
'tabWidth': 2,
|
|
32
|
-
'singleQuote': true,
|
|
33
|
-
'trailingComma': 'all',
|
|
34
|
-
'arrowParens': 'always',
|
|
35
|
-
'semi': false,
|
|
36
|
-
'endOfLine': 'auto',
|
|
37
|
-
}],
|
|
38
23
|
'react/react-in-jsx-scope': 'off',
|
|
39
24
|
'react/prop-types': 'off',
|
|
25
|
+
'react/self-closing-comp': 'error',
|
|
26
|
+
'react/no-unknown-property': 'error',
|
|
40
27
|
'jsx-a11y/alt-text': [
|
|
41
28
|
'warn',
|
|
42
29
|
{
|
|
@@ -49,17 +36,11 @@ module.exports = {
|
|
|
49
36
|
'jsx-a11y/aria-unsupported-elements': 'warn',
|
|
50
37
|
'jsx-a11y/role-has-required-aria-props': 'warn',
|
|
51
38
|
'jsx-a11y/role-supports-aria-props': 'warn',
|
|
52
|
-
'react/no-unknown-property': 'error',
|
|
53
39
|
},
|
|
40
|
+
|
|
54
41
|
settings: {
|
|
55
42
|
react: {
|
|
56
43
|
version: 'detect',
|
|
57
44
|
},
|
|
58
|
-
'import/parsers': {
|
|
59
|
-
[require.resolve('@typescript-eslint/parser')]: ['.ts', '.tsx', '.d.ts'],
|
|
60
|
-
},
|
|
61
45
|
},
|
|
62
|
-
|
|
63
|
-
'node_modules'
|
|
64
|
-
]
|
|
65
|
-
}
|
|
46
|
+
}
|