@w5s/eslint-config 1.4.4 → 1.4.5

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 ts_js_1 = __importDefault(require("./ts.js"));
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') ? ts_js_1.default : {}, jest_js_1.default, json_js_1.default, yml_js_1.default, {
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;
@@ -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.sourceExtensions().filter((ext) => !ext.includes('js')),
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': {
@@ -13,7 +13,7 @@ const config = {
13
13
  files: [
14
14
  dev_1.Project.extensionsToGlob(
15
15
  // ts only extensions
16
- dev_1.Project.sourceExtensions().filter((_) => _.includes('ts'))),
16
+ dev_1.Project.queryExtensions(['typescript', 'typescriptreact'])),
17
17
  ],
18
18
  },
19
19
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/eslint-config",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
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": "^1.5.0",
39
- "@w5s/prettier-config": "^1.1.6",
38
+ "@w5s/dev": "^1.5.1",
39
+ "@w5s/prettier-config": "^1.1.7",
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",
@@ -69,5 +69,5 @@
69
69
  "publishConfig": {
70
70
  "access": "public"
71
71
  },
72
- "gitHead": "824cd89a55dcf5b99977c51c8c54c00143769f24"
72
+ "gitHead": "7ab5287bc67b525c4bcfe83456c642c5226d900f"
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 tsConfig from './ts.js';
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') ? tsConfig : {},
22
+ tryResolve('typescript') ? typescriptConfig : {},
23
23
  jestConfig,
24
24
  jsonConfig,
25
25
  ymlConfig,
@@ -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.sourceExtensions().filter((ext) => !ext.includes('js')),
49
+ '@typescript-eslint/parser': Project.queryExtensions(['typescript', 'typescriptreact']),
50
50
  },
51
51
  // Append 'ts' extensions to Airbnb 'import/resolver' setting
52
52
  'import/resolver': {
@@ -14,7 +14,7 @@ const config: eslint.Linter.Config = {
14
14
  files: [
15
15
  Project.extensionsToGlob(
16
16
  // ts only extensions
17
- Project.sourceExtensions().filter((_) => _.includes('ts'))
17
+ Project.queryExtensions(['typescript', 'typescriptreact'])
18
18
  ),
19
19
  ],
20
20
  },
File without changes