@joondeveloper/eslint-config 0.1.0 → 0.1.2

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