@w5s/eslint-config 1.4.4 → 2.0.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/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
const dev_1 = require("@w5s/dev");
|
|
6
6
|
const ignore_js_1 = __importDefault(require("./rules/ignore.js"));
|
|
7
7
|
const es_js_1 = __importDefault(require("./es.js"));
|
|
8
|
-
const
|
|
8
|
+
const typescript_js_1 = __importDefault(require("./typescript.js"));
|
|
9
9
|
const jest_js_1 = __importDefault(require("./jest.js"));
|
|
10
10
|
const json_js_1 = __importDefault(require("./json.js"));
|
|
11
11
|
const yml_js_1 = __importDefault(require("./yml.js"));
|
|
@@ -18,7 +18,7 @@ function tryResolve(name) {
|
|
|
18
18
|
return false;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
const config = dev_1.ESLintConfig.concat(ignore_js_1.default, es_js_1.default, tryResolve('typescript') ?
|
|
21
|
+
const config = dev_1.ESLintConfig.concat(ignore_js_1.default, es_js_1.default, tryResolve('typescript') ? typescript_js_1.default : {}, jest_js_1.default, json_js_1.default, yml_js_1.default, {
|
|
22
22
|
root: true,
|
|
23
23
|
});
|
|
24
24
|
module.exports = config;
|
package/dist/rules/es/import.js
CHANGED
|
@@ -44,7 +44,7 @@ const config = dev_1.ESLintConfig.concat(imports_1.default,
|
|
|
44
44
|
'import/ignore': [...dev_1.Project.ignored(), dev_1.Project.extensionsToMatcher(dev_1.Project.resourceExtensions()).source],
|
|
45
45
|
// Apply special parsing for TypeScript files
|
|
46
46
|
'import/parsers': {
|
|
47
|
-
'@typescript-eslint/parser': dev_1.Project.
|
|
47
|
+
'@typescript-eslint/parser': dev_1.Project.queryExtensions(['typescript', 'typescriptreact']),
|
|
48
48
|
},
|
|
49
49
|
// Append 'ts' extensions to Airbnb 'import/resolver' setting
|
|
50
50
|
'import/resolver': {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@w5s/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "ESLint configuration presets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@rushstack/eslint-patch": "^1.1.0",
|
|
36
36
|
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
37
37
|
"@typescript-eslint/parser": "^6.0.0",
|
|
38
|
-
"@w5s/dev": "^
|
|
39
|
-
"@w5s/prettier-config": "^
|
|
38
|
+
"@w5s/dev": "^2.0.0",
|
|
39
|
+
"@w5s/prettier-config": "^2.0.0",
|
|
40
40
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
41
41
|
"eslint-config-prettier": "^9.0.0",
|
|
42
42
|
"eslint-plugin-import": "^2.25.0",
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"engines": {
|
|
67
|
-
"node": ">=
|
|
67
|
+
"node": ">=18.0.0"
|
|
68
68
|
},
|
|
69
69
|
"publishConfig": {
|
|
70
70
|
"access": "public"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "df3ad719f23deb6ab6a2c546664b0496fee3a039"
|
|
73
73
|
}
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type eslint from 'eslint';
|
|
|
2
2
|
import { ESLintConfig } from '@w5s/dev';
|
|
3
3
|
import ignoreConfig from './rules/ignore.js';
|
|
4
4
|
import esConfig from './es.js';
|
|
5
|
-
import
|
|
5
|
+
import typescriptConfig from './typescript.js';
|
|
6
6
|
import jestConfig from './jest.js';
|
|
7
7
|
import jsonConfig from './json.js';
|
|
8
8
|
import ymlConfig from './yml.js';
|
|
@@ -19,7 +19,7 @@ function tryResolve(name: string) {
|
|
|
19
19
|
const config: eslint.Linter.Config = ESLintConfig.concat(
|
|
20
20
|
ignoreConfig,
|
|
21
21
|
esConfig,
|
|
22
|
-
tryResolve('typescript') ?
|
|
22
|
+
tryResolve('typescript') ? typescriptConfig : {},
|
|
23
23
|
jestConfig,
|
|
24
24
|
jsonConfig,
|
|
25
25
|
ymlConfig,
|
package/src/rules/es/import.ts
CHANGED
|
@@ -46,7 +46,7 @@ const config: eslint.Linter.Config = ESLintConfig.concat(
|
|
|
46
46
|
|
|
47
47
|
// Apply special parsing for TypeScript files
|
|
48
48
|
'import/parsers': {
|
|
49
|
-
'@typescript-eslint/parser': Project.
|
|
49
|
+
'@typescript-eslint/parser': Project.queryExtensions(['typescript', 'typescriptreact']),
|
|
50
50
|
},
|
|
51
51
|
// Append 'ts' extensions to Airbnb 'import/resolver' setting
|
|
52
52
|
'import/resolver': {
|
|
File without changes
|