@slashnephy/eslint-config 3.0.114 → 3.0.115

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": "@slashnephy/eslint-config",
3
- "version": "3.0.114",
3
+ "version": "3.0.115",
4
4
  "keywords": [
5
5
  "eslint",
6
6
  "eslintconfig"
@@ -1,7 +1,7 @@
1
1
  import safeTypeScriptPlugin from '@susisu/eslint-plugin-safe-typescript';
2
- import { defineConfig } from 'eslint/config';
3
2
  import { importX } from 'eslint-plugin-import-x';
4
3
  import tsdocPlugin from 'eslint-plugin-tsdoc';
4
+ import { defineConfig } from 'eslint/config';
5
5
  import tseslint from 'typescript-eslint';
6
6
  export const typeScript = defineConfig({
7
7
  files: ['**/*.cts'],
@@ -208,6 +208,10 @@ export const typeScript = defineConfig({
208
208
  },
209
209
  ],
210
210
  },
211
+ }, {
212
+ name: 'typescript-eslint (JavaScript)',
213
+ files: ['**/*.{js,cjs,mjs,jsx}'],
214
+ extends: [tseslint.configs.disableTypeChecked],
211
215
  }, {
212
216
  name: 'eslint-plugin-import-x',
213
217
  files: ['**/*.{ts,cts,mts,tsx}'],
@@ -1,7 +1,7 @@
1
1
  import safeTypeScriptPlugin from '@susisu/eslint-plugin-safe-typescript'
2
- import { defineConfig } from 'eslint/config'
3
2
  import { importX } from 'eslint-plugin-import-x'
4
3
  import tsdocPlugin from 'eslint-plugin-tsdoc'
4
+ import { defineConfig } from 'eslint/config'
5
5
  import tseslint from 'typescript-eslint'
6
6
 
7
7
  export const typeScript = defineConfig(
@@ -214,6 +214,12 @@ export const typeScript = defineConfig(
214
214
  ],
215
215
  },
216
216
  },
217
+ {
218
+ name: 'typescript-eslint (JavaScript)',
219
+ files: ['**/*.{js,cjs,mjs,jsx}'],
220
+ extends: [tseslint.configs.disableTypeChecked],
221
+ },
222
+
217
223
  {
218
224
  name: 'eslint-plugin-import-x',
219
225
  files: ['**/*.{ts,cts,mts,tsx}'],
package/src/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineConfig } from 'eslint/config';
1
+ import { defineConfig, globalIgnores } from 'eslint/config';
2
2
  import { common } from './base/common.js';
3
3
  import { graphql } from './base/graphql.js';
4
4
  import { javaScript } from './base/javascript.js';
@@ -16,7 +16,7 @@ import { storybook } from './frameworks/storybook.js';
16
16
  import { vite } from './frameworks/vite.js';
17
17
  import { vitest } from './frameworks/vitest.js';
18
18
  export function config(options, ...overrides) {
19
- return defineConfig(
19
+ return defineConfig(globalIgnores(options?.ignores ?? []),
20
20
  // ベース
21
21
  [
22
22
  common,
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { defineConfig } from 'eslint/config'
1
+ import { defineConfig, globalIgnores } from 'eslint/config'
2
2
 
3
3
  import { common } from './base/common.js'
4
4
  import { graphql } from './base/graphql.js'
@@ -19,11 +19,14 @@ import { vitest } from './frameworks/vitest.js'
19
19
 
20
20
  import type { ConfigArray, ConfigWithExtends } from 'typescript-eslint'
21
21
 
22
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- 将来のために予約してある
23
- type Options = {}
22
+ type Options = {
23
+ ignores?: string[]
24
+ }
24
25
 
25
26
  export function config(options?: Options, ...overrides: ConfigWithExtends[]): ConfigArray {
26
27
  return defineConfig(
28
+ globalIgnores(options?.ignores ?? []),
29
+
27
30
  // ベース
28
31
  [
29
32
  common,