@joondeveloper/eslint-config 0.0.3 → 0.1.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.
Files changed (5) hide show
  1. package/base.js +44 -0
  2. package/next.js +2 -52
  3. package/node.js +2 -26
  4. package/package.json +12 -26
  5. package/react.js +11 -49
package/base.js ADDED
@@ -0,0 +1,44 @@
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
+ }
package/next.js CHANGED
@@ -1,56 +1,6 @@
1
1
  module.exports = {
2
- env: {
3
- browser: true,
4
- es2021: true,
5
- jest: true,
6
- },
7
2
  extends: [
8
- 'standard',
9
- 'plugin:@typescript-eslint/recommended',
10
- 'plugin:prettier/recommended',
3
+ './react',
4
+ 'next/core-web-vitals',
11
5
  ],
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
6
  }
package/node.js CHANGED
@@ -1,31 +1,7 @@
1
1
  module.exports = {
2
+ extends: ['./base'],
3
+
2
4
  env: {
3
- es2021: true,
4
5
  node: true,
5
6
  },
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
7
  }
package/package.json CHANGED
@@ -1,35 +1,21 @@
1
1
  {
2
2
  "name": "@joondeveloper/eslint-config",
3
- "version": "0.0.3",
4
- "private": false,
5
- "description": "Configuração do ESLint",
6
- "main": "index.js",
3
+ "version": "0.1.0",
7
4
  "license": "MIT",
8
- "repository": {
9
- "url": "joaomjbraga/eslint-config-joondeveloper"
10
- },
5
+ "main": "base.js",
11
6
  "peerDependencies": {
12
- "eslint": "^8.0.0",
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": "^6.21.0",
22
- "@typescript-eslint/parser": "^6.21.0",
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
- "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"
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"
34
20
  }
35
21
  }
package/react.js CHANGED
@@ -1,65 +1,27 @@
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
- 'standard',
11
- 'plugin:@typescript-eslint/recommended',
12
- 'plugin:prettier/recommended',
6
+ 'plugin:jsx-a11y/recommended',
13
7
  ],
14
- parser: '@typescript-eslint/parser',
15
- parserOptions: {
16
- ecmaFeatures: {
17
- jsx: true
18
- },
19
- ecmaVersion: 'latest',
20
- sourceType: 'module'
8
+
9
+ env: {
10
+ browser: true,
11
+ jest: true,
21
12
  },
22
- plugins: [
23
- 'react',
24
- 'jsx-a11y',
25
- '@typescript-eslint'
26
- ],
13
+
14
+ plugins: ['react'],
15
+
27
16
  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
17
  'react/react-in-jsx-scope': 'off',
39
18
  'react/prop-types': 'off',
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',
19
+ 'react/self-closing-comp': 'error',
53
20
  },
21
+
54
22
  settings: {
55
23
  react: {
56
24
  version: 'detect',
57
25
  },
58
- 'import/parsers': {
59
- [require.resolve('@typescript-eslint/parser')]: ['.ts', '.tsx', '.d.ts'],
60
- },
61
26
  },
62
- ignorePatterns: [
63
- 'node_modules'
64
- ]
65
27
  }