@joondeveloper/eslint-config 0.1.1 → 0.1.3

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