@viclafouch/eslint-config-viclafouch 4.0.0 → 4.1.1-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viclafouch/eslint-config-viclafouch",
3
- "version": "4.0.0",
3
+ "version": "4.1.1-beta.0",
4
4
  "description": "ESLint and Prettier Config from Victor de la Fouchardiere",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -31,29 +31,31 @@
31
31
  "dependencies": {
32
32
  "@total-typescript/ts-reset": "^0.4.2",
33
33
  "get-tsconfig": "^4.6.2",
34
- "@babel/core": "^7.22.6",
35
- "@babel/eslint-parser": "^7.22.6",
36
- "@next/eslint-plugin-next": "^13.4.8",
34
+ "@babel/core": "^7.22.8",
35
+ "@babel/eslint-parser": "^7.22.7",
36
+ "@next/eslint-plugin-next": "^13.4.9",
37
37
  "@rushstack/eslint-patch": "^1.3.2",
38
- "@typescript-eslint/eslint-plugin": "^5.61.0",
39
- "@typescript-eslint/parser": "^5.61.0",
40
- "babel-loader": "^9.1.2",
38
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
39
+ "@typescript-eslint/parser": "^6.0.0",
40
+ "babel-loader": "^9.1.3",
41
41
  "eslint": "^8.44.0",
42
42
  "eslint-config-prettier": "^8.8.0",
43
43
  "eslint-plugin-import": "^2.27.5",
44
44
  "eslint-plugin-jsx-a11y": "^6.7.1",
45
- "eslint-plugin-prettier": "^4.2.1",
45
+ "eslint-plugin-prettier": "^5.0.0",
46
46
  "eslint-plugin-promise": "^6.1.1",
47
47
  "eslint-plugin-react": "^7.32.2",
48
48
  "eslint-plugin-react-hooks": "^4.6.0",
49
49
  "eslint-plugin-simple-import-sort": "^10.0.0",
50
50
  "eslint-plugin-testing-library": "^5.11.0",
51
- "prettier": "^2.8.8",
51
+ "prettier": "^3.0.0",
52
52
  "typescript": "^5.x.x"
53
53
  },
54
54
  "scripts": {
55
55
  "lint": "eslint .",
56
56
  "lint:fix": "eslint --fix",
57
+ "bump": "npm version minor",
58
+ "publish": "npm publish",
57
59
  "bump:beta": "npm version prerelease --preid beta",
58
60
  "publish:beta": "npm publish --tag beta"
59
61
  }
@@ -14,87 +14,87 @@ module.exports = {
14
14
  'import/parsers': {
15
15
  '@typescript-eslint/parser': ['.ts', '.tsx', '.d.ts']
16
16
  },
17
- // Append 'ts' extensions to Frichti 'import/resolver' setting
17
+ // Append 'ts' extensions to @viclafouch/eslint 'import/resolver' setting
18
18
  // Original: ['.mjs', '.js', '.json']
19
19
  'import/resolver': {
20
20
  node: {
21
21
  extensions: ['.mjs', '.js', '.json', '.ts', '.d.ts']
22
22
  }
23
23
  },
24
- // Append 'ts' extensions to Frichti 'import/extensions' setting
24
+ // Append 'ts' extensions to @viclafouch/eslint 'import/extensions' setting
25
25
  // Original: ['.js', '.mjs', '.jsx']
26
26
  'import/extensions': ['.js', '.mjs', '.jsx', '.ts', '.tsx', '.d.ts'],
27
27
  // Resolve type definition packages
28
28
  'import/external-module-folders': ['node_modules', 'node_modules/@types']
29
29
  },
30
30
  rules: {
31
- // Replace Frichti 'default-param-last' rule with '@typescript-eslint' version
31
+ // Replace @viclafouch/eslint 'default-param-last' rule with '@typescript-eslint' version
32
32
  // https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/default-param-last.md
33
33
  'default-param-last': 'off',
34
34
  '@typescript-eslint/default-param-last':
35
35
  baseBestPracticesRules['default-param-last'],
36
36
 
37
- // Replace Frichti 'dot-notation' rule with '@typescript-eslint' version
37
+ // Replace @viclafouch/eslint 'dot-notation' rule with '@typescript-eslint' version
38
38
  // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md
39
39
  'dot-notation': 'off',
40
40
  '@typescript-eslint/dot-notation': baseBestPracticesRules['dot-notation'],
41
41
 
42
- // Replace Frichti 'no-empty-function' rule with '@typescript-eslint' version
42
+ // Replace @viclafouch/eslint 'no-empty-function' rule with '@typescript-eslint' version
43
43
  // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-function.md
44
44
  'no-empty-function': 'off',
45
45
  '@typescript-eslint/no-empty-function':
46
46
  baseBestPracticesRules['no-empty-function'],
47
47
 
48
- // Replace Frichti 'no-extra-semi' rule with '@typescript-eslint' version
48
+ // Replace @viclafouch/eslint 'no-extra-semi' rule with '@typescript-eslint' version
49
49
  // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-semi.md
50
50
  'no-extra-semi': 'off',
51
51
  '@typescript-eslint/no-extra-semi': baseErrorsRules['no-extra-semi'],
52
52
 
53
- // Replace Frichti 'no-redeclare' rule with '@typescript-eslint' version
53
+ // Replace @viclafouch/eslint 'no-redeclare' rule with '@typescript-eslint' version
54
54
  // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-redeclare.md
55
55
  'no-redeclare': 'off',
56
56
  '@typescript-eslint/no-redeclare': baseBestPracticesRules['no-redeclare'],
57
57
 
58
- // Replace Frichti 'no-shadow' rule with '@typescript-eslint' version
58
+ // Replace @viclafouch/eslint 'no-shadow' rule with '@typescript-eslint' version
59
59
  // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
60
60
  'no-shadow': 'off',
61
61
  '@typescript-eslint/no-shadow': baseVariablesRules['no-shadow'],
62
62
 
63
- // Replace Frichti 'no-throw-literal' rule with '@typescript-eslint' version
63
+ // Replace @viclafouch/eslint 'no-throw-literal' rule with '@typescript-eslint' version
64
64
  // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-throw-literal.md
65
65
  'no-throw-literal': 'off',
66
66
  '@typescript-eslint/no-throw-literal':
67
67
  baseBestPracticesRules['no-throw-literal'],
68
68
 
69
- // Replace Frichti 'no-unused-expressions' rule with '@typescript-eslint' version
69
+ // Replace @viclafouch/eslint 'no-unused-expressions' rule with '@typescript-eslint' version
70
70
  // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-expressions.md
71
71
  'no-unused-expressions': 'off',
72
72
  '@typescript-eslint/no-unused-expressions':
73
73
  baseBestPracticesRules['no-unused-expressions'],
74
74
 
75
- // Replace Frichti 'no-unused-vars' rule with '@typescript-eslint' version
75
+ // Replace @viclafouch/eslint 'no-unused-vars' rule with '@typescript-eslint' version
76
76
  // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
77
77
  'no-unused-vars': 'off',
78
78
  '@typescript-eslint/no-unused-vars': baseVariablesRules['no-unused-vars'],
79
79
 
80
- // Replace Frichti 'no-use-before-define' rule with '@typescript-eslint' version
80
+ // Replace @viclafouch/eslint 'no-use-before-define' rule with '@typescript-eslint' version
81
81
  // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md
82
82
  'no-use-before-define': 'off',
83
83
  '@typescript-eslint/no-use-before-define':
84
84
  baseVariablesRules['no-use-before-define'],
85
85
 
86
- // Replace Frichti 'no-useless-constructor' rule with '@typescript-eslint' version
86
+ // Replace @viclafouch/eslint 'no-useless-constructor' rule with '@typescript-eslint' version
87
87
  // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-useless-constructor.md
88
88
  'no-useless-constructor': 'off',
89
89
  '@typescript-eslint/no-useless-constructor':
90
90
  baseES6Rules['no-useless-constructor'],
91
91
 
92
- // Replace Frichti 'require-await' rule with '@typescript-eslint' version
92
+ // Replace @viclafouch/eslint 'require-await' rule with '@typescript-eslint' version
93
93
  // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-await.md
94
94
  'require-await': 'off',
95
95
  '@typescript-eslint/require-await': baseES6Rules['require-await'],
96
96
 
97
- // Replace Frichti 'no-return-await' rule with '@typescript-eslint' version
97
+ // Replace @viclafouch/eslint 'no-return-await' rule with '@typescript-eslint' version
98
98
  // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md
99
99
  'no-return-await': 'off',
100
100
  '@typescript-eslint/return-await': [
@@ -112,28 +112,28 @@ module.exports = {
112
112
  selector: 'typeLike',
113
113
  format: ['PascalCase']
114
114
  }
115
- ],
116
-
117
- '@typescript-eslint/ban-types': [
118
- 'error',
119
- {
120
- types: {
121
- // Omit is not strict enought
122
- Omit: {
123
- // https://twitter.com/erikras/status/1673694889974833152
124
- message:
125
- 'Use StrictOmit instead by using reset.d.ts from @viclafouch/eslint-config-viclafouch/reset.d. See https://github.com/viclafouch/eslint-config-viclafouch#better-typing',
126
- fixWith: 'StrictOmit'
127
- }
128
- }
129
- }
130
115
  ]
116
+
117
+ // '@typescript-eslint/ban-types': [
118
+ // 'error',
119
+ // {
120
+ // types: {
121
+ // // Omit is not strict enought
122
+ // Omit: {
123
+ // // https://twitter.com/erikras/status/1673694889974833152
124
+ // message:
125
+ // 'Use StrictOmit instead by using reset.d.ts from @viclafouch/eslint-config-viclafouch/reset.d. See https://github.com/viclafouch/eslint-config-viclafouch#better-typing',
126
+ // fixWith: 'StrictOmit'
127
+ // }
128
+ // }
129
+ // }
130
+ // ]
131
131
  },
132
132
  overrides: [
133
133
  {
134
134
  files: ['*.ts?(x)'],
135
135
  rules: {
136
- // The following rules are enabled in Frichti config, but are already checked (more thoroughly) by the TypeScript compiler
136
+ // The following rules are enabled in @viclafouch/eslint config, but are already checked (more thoroughly) by the TypeScript compiler
137
137
  // Some of the rules also fail in TypeScript files, for example: https://github.com/typescript-eslint/typescript-eslint/issues/662#issuecomment-507081586
138
138
  // Rules are inspired by: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslint-recommended.ts
139
139
  'constructor-super': 'off',
@@ -154,7 +154,7 @@ module.exports = {
154
154
  'no-unreachable': 'off',
155
155
  'no-unsafe-negation': 'off',
156
156
  'valid-typeof': 'off',
157
- // The following rules are enabled in Frichti config, but are recommended to be disabled within TypeScript projects
157
+ // The following rules are enabled in @viclafouch/eslint config, but are recommended to be disabled within TypeScript projects
158
158
  // See: https://github.com/typescript-eslint/typescript-eslint/blob/13583e65f5973da2a7ae8384493c5e00014db51b/docs/linting/TROUBLESHOOTING.md#eslint-plugin-import
159
159
  'import/named': 'off',
160
160
  'import/no-named-as-default-member': 'off',
package/tsconfig.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "esModuleInterop": true,
12
12
  "module": "esnext",
13
13
  "noUncheckedIndexedAccess": true,
14
- "noPropertyAccessFromIndexSignature": true,
14
+ "noPropertyAccessFromIndexSignature": false,
15
15
  "moduleResolution": "node",
16
16
  "resolveJsonModule": true,
17
17
  "isolatedModules": true,