@gewis/eslint-config-typescript 2.2.2 → 2.3.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/index.mjs +22 -4
- package/package.json +5 -6
package/index.mjs
CHANGED
@@ -7,6 +7,7 @@ import importPlugin from 'eslint-plugin-import';
|
|
7
7
|
import { includeIgnoreFile } from '@eslint/compat';
|
8
8
|
|
9
9
|
const config = [
|
10
|
+
// Ignored
|
10
11
|
includeIgnoreFile(path.resolve('.gitignore')),
|
11
12
|
eslint.configs.recommended,
|
12
13
|
...tsEslint.configs.recommendedTypeChecked,
|
@@ -20,19 +21,19 @@ const config = [
|
|
20
21
|
},
|
21
22
|
// Default rules
|
22
23
|
{
|
23
|
-
files: ['**/*.{ts,tsx,mts,cts,vue}'],
|
24
|
+
files: ['**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs,vue}'],
|
24
25
|
rules: {
|
25
26
|
'max-len': ['warn', { code: 120 }],
|
26
27
|
semi: ['error', 'always'],
|
27
28
|
'object-curly-spacing': ['error', 'always'],
|
28
29
|
'linebreak-style': ['error', 'unix'],
|
29
|
-
'no-console': ['
|
30
|
+
'no-console': ['error', { allow: ['info', 'warn', 'error'] }],
|
30
31
|
},
|
31
32
|
},
|
32
33
|
// Plugin by plugin for better overview
|
33
34
|
// Import plugin configuration
|
34
35
|
{
|
35
|
-
files: ['**/*.{ts,tsx,mts,cts,vue}'],
|
36
|
+
files: ['**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs,vue}'],
|
36
37
|
plugins: {
|
37
38
|
import: importPlugin,
|
38
39
|
},
|
@@ -53,9 +54,26 @@ const config = [
|
|
53
54
|
'import/named': 'off',
|
54
55
|
'import/order': ['warn'],
|
55
56
|
'import/first': ['warn'],
|
57
|
+
'import/extensions': [
|
58
|
+
'error',
|
59
|
+
'ignorePackages',
|
60
|
+
{
|
61
|
+
js: 'never',
|
62
|
+
jsx: 'never',
|
63
|
+
ts: 'never',
|
64
|
+
tsx: 'never',
|
65
|
+
mjs: 'never',
|
66
|
+
cjs: 'never',
|
67
|
+
vue: 'never',
|
68
|
+
},
|
69
|
+
],
|
56
70
|
},
|
57
71
|
},
|
72
|
+
// Disable TypeChecks for js files
|
73
|
+
{
|
74
|
+
files: ['**/*.{js,jsx,mjs,cjs}'],
|
75
|
+
...tsEslint.configs.disableTypeChecked,
|
76
|
+
},
|
58
77
|
];
|
59
78
|
|
60
|
-
// eslint-disable-next-line import/prefer-default-export -- prefer named export here
|
61
79
|
export { config as eslintConfig };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gewis/eslint-config-typescript",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.3.0",
|
4
4
|
"description": "TypeScript ESLint configuration for GEWIS projects",
|
5
5
|
"homepage": "https://github.com/GEWIS/js-configs#readme",
|
6
6
|
"bugs": {
|
@@ -26,16 +26,15 @@
|
|
26
26
|
"README.md"
|
27
27
|
],
|
28
28
|
"dependencies": {
|
29
|
-
"@eslint/compat": "^1.2.
|
30
|
-
"@eslint/js": "9.
|
31
|
-
"@types/eslint__js": "^8.42.3",
|
29
|
+
"@eslint/compat": "^1.2.7",
|
30
|
+
"@eslint/js": "9.22.0",
|
32
31
|
"eslint-import-resolver-typescript": "^3.8.3",
|
33
32
|
"eslint-plugin-import": "^2.31.0",
|
34
|
-
"typescript-eslint": "^8.
|
33
|
+
"typescript-eslint": "^8.25.0"
|
35
34
|
},
|
36
35
|
"peerDependencies": {
|
37
36
|
"eslint": "*"
|
38
37
|
},
|
39
38
|
"packageManager": "yarn@4.5.1",
|
40
|
-
"gitHead": "
|
39
|
+
"gitHead": "59935539c9bd730ae9513a6ea81a6110da921d4f"
|
41
40
|
}
|