@sxzz/eslint-config 3.0.0-beta.6 → 3.0.0-beta.7

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": "@sxzz/eslint-config",
3
- "version": "3.0.0-beta.6",
3
+ "version": "3.0.0-beta.7",
4
4
  "packageManager": "pnpm@8.2.0",
5
5
  "description": "ESLint config for @sxzz.",
6
6
  "type": "module",
package/src/js.js CHANGED
@@ -3,6 +3,7 @@ import jsConfig from '@eslint/js'
3
3
  import importPlugin from 'eslint-plugin-import'
4
4
  import unicornPlugin from 'eslint-plugin-unicorn'
5
5
  import antfuPlugin from 'eslint-plugin-antfu'
6
+ import { GLOB_SRC, GLOB_SRC_EXT } from './shared.js'
6
7
 
7
8
  export { importPlugin, unicornPlugin, antfuPlugin }
8
9
 
@@ -144,11 +145,26 @@ export const imports = [
144
145
  pathGroupsExcludedImportTypes: ['type'],
145
146
  },
146
147
  ],
148
+ 'import/no-default-export': 'error',
147
149
 
148
150
  'antfu/import-dedupe': 'error',
149
151
  'antfu/prefer-inline-type-import': 'error',
150
152
  },
151
153
  },
154
+ {
155
+ files: [
156
+ `**/*config*.${GLOB_SRC_EXT}`,
157
+ `**/views/${GLOB_SRC}`,
158
+ `**/pages/${GLOB_SRC}`,
159
+ `**/{index,vite,esbuild,rollup,webpack,rspack}.ts`,
160
+ ],
161
+ plugins: {
162
+ import: importPlugin,
163
+ },
164
+ rules: {
165
+ 'import/no-default-export': 'off',
166
+ },
167
+ },
152
168
  ]
153
169
 
154
170
  /** @type {import('eslint-define-config').FlatESLintConfigItem[]} */
package/src/shared.js CHANGED
@@ -1,5 +1,6 @@
1
1
  // @ts-check
2
2
 
3
+ export const GLOB_SRC_EXT = '?([mt])[jt]s?(x)'
3
4
  export const GLOB_SRC = '**/*.?([mt])[jt]s?(x)'
4
5
 
5
6
  export const GLOB_JS = '**/*.?([mt])js'