@mouse_484/eslint-config 5.5.4 → 5.7.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mouse_484/eslint-config",
3
3
  "type": "module",
4
- "version": "5.5.4",
4
+ "version": "5.7.0",
5
5
  "author": "mouse_484",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/mouse484/config/tree/main/packages/eslint",
@@ -1,4 +1,6 @@
1
1
  import { GLOB_ASTRO } from '@antfu/eslint-config'
2
+ import { CASES } from '../const/cases.js'
3
+ import { GLOB_ASTRO_SCRIPT_TAG } from '../const/glob.js'
2
4
  import { createConfigs } from '../lib/factory.js'
3
5
 
4
6
  export default createConfigs({
@@ -12,5 +14,23 @@ export default createConfigs({
12
14
  'astro/no-set-html-directive': 'error',
13
15
  },
14
16
  },
17
+ {
18
+ name: 'astro-components-filename-case',
19
+ files: [GLOB_ASTRO],
20
+ ignores: [`**/pages/${GLOB_ASTRO}`],
21
+ rules: {
22
+ 'unicorn/filename-case': [
23
+ 'error',
24
+ { case: CASES.PascalCase },
25
+ ],
26
+ },
27
+ },
28
+ {
29
+ name: 'astro-scripts-filename-case',
30
+ files: [GLOB_ASTRO_SCRIPT_TAG],
31
+ rules: {
32
+ 'unicorn/filename-case': 'off',
33
+ },
34
+ },
15
35
  ],
16
36
  })
package/src/const/glob.js CHANGED
@@ -1,3 +1,5 @@
1
+ import { GLOB_ASTRO } from '@antfu/eslint-config'
2
+
1
3
  export { GLOB_SVELTE as GLOB_SVELTE_COMPONENTS } from '@antfu/eslint-config'
2
4
 
3
5
  export const GLOB_SVELTE_ROUTES = '**/src/routes/**/\+*.svelte'
@@ -11,3 +13,5 @@ export const GLOB_README = '**/README.md'
11
13
  export const GLOB_MARKDOWN_CODE_BLOCK = '**/*.md/**'
12
14
 
13
15
  export const GLOB_D_TS = '**/*.d.ts'
16
+
17
+ export const GLOB_ASTRO_SCRIPT_TAG = `${GLOB_ASTRO}/*`