@vertexvis/eslint-config-vertexvis-typescript 0.5.2 → 0.6.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/README.md +7 -19
- package/index.js +41 -32
- package/package.json +15 -11
- package/.eslintrc.js +0 -3
- package/patch.js +0 -3
package/README.md
CHANGED
|
@@ -12,30 +12,18 @@ Add this package and ESLint as `devDependencies` to your `package.json`.
|
|
|
12
12
|
// package.json
|
|
13
13
|
{
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@vertexvis/eslint-config-vertexvis-typescript": "0.
|
|
16
|
-
"eslint": "^
|
|
15
|
+
"@vertexvis/eslint-config-vertexvis-typescript": "0.6.0",
|
|
16
|
+
"eslint": "^8.57.0"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
Add
|
|
22
|
-
|
|
23
|
-
This package also includes an optional patch file which monkey patches ESLint's
|
|
24
|
-
module resolution for plugins. ESLint resolves plugins relative to the consuming
|
|
25
|
-
package. So any plugins referenced by a sharable config will need to NPM
|
|
26
|
-
installed in the consuming package. There's an [open
|
|
27
|
-
issue](https://github.com/eslint/eslint/issues/3458#issuecomment-516716165) and
|
|
28
|
-
discussion to change this behavior to resolve plugins relative to the imported
|
|
29
|
-
config's `node_modules` folder. This shim mimics this behavior.
|
|
21
|
+
Add an `eslint.config.js` file to the root of your project that imports this
|
|
22
|
+
config.
|
|
30
23
|
|
|
31
24
|
```js
|
|
32
|
-
// .
|
|
33
|
-
|
|
34
|
-
// Include the optional patch which resolves ESLint plugins relative to the
|
|
35
|
-
// sharable config package.
|
|
36
|
-
require('@vertexvis/eslint-config-vertexvis-typescript/patch');
|
|
25
|
+
// eslint.config.js
|
|
26
|
+
import vertexvisTypescript from '@vertexvis/eslint-config-vertexvis-typescript';
|
|
37
27
|
|
|
38
|
-
|
|
39
|
-
extends: '@vertexvis/vertexvis-typescript',
|
|
40
|
-
};
|
|
28
|
+
export default [...vertexvisTypescript];
|
|
41
29
|
```
|
package/index.js
CHANGED
|
@@ -1,34 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
'
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import typescriptPlugin from '@typescript-eslint/eslint-plugin';
|
|
2
|
+
import typescriptParser from '@typescript-eslint/parser';
|
|
3
|
+
import vertexvis from '@vertexvis/eslint-config-vertexvis';
|
|
4
|
+
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
5
|
+
|
|
6
|
+
export default [
|
|
7
|
+
...vertexvis,
|
|
8
|
+
{
|
|
9
|
+
files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'],
|
|
10
|
+
languageOptions: {
|
|
11
|
+
parser: typescriptParser,
|
|
12
|
+
sourceType: 'module',
|
|
13
|
+
},
|
|
14
|
+
plugins: {
|
|
15
|
+
'@typescript-eslint': typescriptPlugin,
|
|
16
|
+
},
|
|
17
|
+
rules: {
|
|
18
|
+
...typescriptPlugin.configs.recommended.rules,
|
|
19
|
+
'@typescript-eslint/indent': 'off',
|
|
20
|
+
'@typescript-eslint/explicit-function-return-type': [
|
|
21
|
+
'error',
|
|
22
|
+
{
|
|
23
|
+
allowExpressions: true,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
|
27
|
+
'@typescript-eslint/func-call-spacing': ['error'],
|
|
28
|
+
'@typescript-eslint/member-ordering': ['error'],
|
|
29
|
+
'@typescript-eslint/no-use-before-define': ['off'],
|
|
30
|
+
'@typescript-eslint/explicit-member-accessibility': ['error'],
|
|
31
|
+
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
|
|
32
|
+
},
|
|
23
33
|
},
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
'@typescript-eslint/explicit-member-accessibility': 'off',
|
|
31
|
-
},
|
|
34
|
+
{
|
|
35
|
+
files: ['**/*.{js,jsx,mjs,cjs}'],
|
|
36
|
+
rules: {
|
|
37
|
+
'@typescript-eslint/no-var-requires': 'off',
|
|
38
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
39
|
+
'@typescript-eslint/explicit-member-accessibility': 'off',
|
|
32
40
|
},
|
|
33
|
-
|
|
34
|
-
|
|
41
|
+
},
|
|
42
|
+
eslintConfigPrettier,
|
|
43
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertexvis/eslint-config-vertexvis-typescript",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "The Vertex sharable ESLint config for TypeScript.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Vertex Developers <support@vertexvis.com> (https://developer.vertexvis.com)",
|
|
@@ -16,27 +16,31 @@
|
|
|
16
16
|
"registry": "https://registry.npmjs.org/",
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
|
+
"type": "module",
|
|
19
20
|
"main": "./index.js",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": "./index.js",
|
|
23
|
+
"./package.json": "./package.json"
|
|
24
|
+
},
|
|
20
25
|
"scripts": {
|
|
21
26
|
"format": "yarn lint --fix",
|
|
22
|
-
"lint": "eslint
|
|
27
|
+
"lint": "eslint .",
|
|
23
28
|
"build": "echo 0",
|
|
24
29
|
"test": "echo 'No unit tests defined'",
|
|
25
30
|
"test:coverage": "echo 'No unit tests defined'"
|
|
26
31
|
},
|
|
27
32
|
"dependencies": {
|
|
28
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
29
|
-
"@typescript-eslint/parser": "^
|
|
30
|
-
"@vertexvis/eslint-config-vertexvis": "0.
|
|
31
|
-
"eslint-config-prettier": "^
|
|
32
|
-
"eslint-plugin-prettier": "^5.0.0"
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "^8.62.1",
|
|
34
|
+
"@typescript-eslint/parser": "^8.62.1",
|
|
35
|
+
"@vertexvis/eslint-config-vertexvis": "0.8.0",
|
|
36
|
+
"eslint-config-prettier": "^10.1.8"
|
|
33
37
|
},
|
|
34
38
|
"devDependencies": {
|
|
35
|
-
"eslint": "^8.
|
|
36
|
-
"typescript": "^
|
|
39
|
+
"eslint": "^8.57.0",
|
|
40
|
+
"typescript": "^5.2.0"
|
|
37
41
|
},
|
|
38
42
|
"peerDependencies": {
|
|
39
|
-
"eslint": ">=
|
|
40
|
-
"typescript": ">=
|
|
43
|
+
"eslint": ">=8.0.0",
|
|
44
|
+
"typescript": ">=5.0.0"
|
|
41
45
|
}
|
|
42
46
|
}
|
package/.eslintrc.js
DELETED
package/patch.js
DELETED