eslint-plugin-spellbookx 0.3.4 → 0.7.1

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.
Files changed (89) hide show
  1. package/.turbo/turbo-build.log +12 -0
  2. package/LICENSE +1 -1
  3. package/README.md +11 -52
  4. package/dist/configs/cspell.d.ts +2 -3
  5. package/dist/configs/cspell.d.ts.map +1 -1
  6. package/dist/configs/ignores.d.ts.map +1 -1
  7. package/dist/configs/javascript.d.ts +1 -2
  8. package/dist/configs/javascript.d.ts.map +1 -1
  9. package/dist/configs/json.d.ts +2 -3
  10. package/dist/configs/json.d.ts.map +1 -1
  11. package/dist/configs/markdown.d.ts +2 -3
  12. package/dist/configs/markdown.d.ts.map +1 -1
  13. package/dist/configs/recommended.d.ts +3 -0
  14. package/dist/configs/recommended.d.ts.map +1 -0
  15. package/dist/configs/vuoto.d.ts +3 -0
  16. package/dist/configs/vuoto.d.ts.map +1 -0
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +485 -43
  20. package/dist/types.d.ts +1 -1
  21. package/dist/types.d.ts.map +1 -1
  22. package/dist/types.js +10 -1
  23. package/package.json +26 -32
  24. package/rolldown.config.ts +31 -0
  25. package/src/configs/cspell.ts +9 -0
  26. package/src/configs/ignores.ts +99 -0
  27. package/src/configs/javascript.ts +322 -0
  28. package/src/configs/json.ts +57 -0
  29. package/src/configs/markdown.ts +15 -0
  30. package/src/configs/recommended.ts +20 -0
  31. package/src/configs/vuoto.ts +12 -0
  32. package/{dist/helpers.js → src/helpers.ts} +6 -1
  33. package/src/index.ts +38 -0
  34. package/src/types.ts +8 -0
  35. package/tsconfig.json +10 -0
  36. package/dist/configs/astro.d.ts +0 -4
  37. package/dist/configs/astro.d.ts.map +0 -1
  38. package/dist/configs/astro.js +0 -67
  39. package/dist/configs/cspell.js +0 -10
  40. package/dist/configs/ignores.js +0 -88
  41. package/dist/configs/index.d.ts +0 -15
  42. package/dist/configs/index.d.ts.map +0 -1
  43. package/dist/configs/index.js +0 -14
  44. package/dist/configs/javascript.js +0 -79
  45. package/dist/configs/json.js +0 -57
  46. package/dist/configs/markdown.js +0 -21
  47. package/dist/configs/prettier.d.ts +0 -4
  48. package/dist/configs/prettier.d.ts.map +0 -1
  49. package/dist/configs/prettier.js +0 -19
  50. package/dist/configs/react.d.ts +0 -4
  51. package/dist/configs/react.d.ts.map +0 -1
  52. package/dist/configs/react.js +0 -61
  53. package/dist/configs/recommended/astro.d.ts +0 -4
  54. package/dist/configs/recommended/astro.d.ts.map +0 -1
  55. package/dist/configs/recommended/astro.js +0 -18
  56. package/dist/configs/recommended/index.d.ts +0 -7
  57. package/dist/configs/recommended/index.d.ts.map +0 -1
  58. package/dist/configs/recommended/index.js +0 -6
  59. package/dist/configs/recommended/no-spellcheck-astro.d.ts +0 -4
  60. package/dist/configs/recommended/no-spellcheck-astro.d.ts.map +0 -1
  61. package/dist/configs/recommended/no-spellcheck-astro.js +0 -16
  62. package/dist/configs/recommended/no-spellcheck-react.d.ts +0 -4
  63. package/dist/configs/recommended/no-spellcheck-react.d.ts.map +0 -1
  64. package/dist/configs/recommended/no-spellcheck-react.js +0 -14
  65. package/dist/configs/recommended/no-spellcheck.d.ts +0 -4
  66. package/dist/configs/recommended/no-spellcheck.d.ts.map +0 -1
  67. package/dist/configs/recommended/no-spellcheck.js +0 -14
  68. package/dist/configs/recommended/react.d.ts +0 -4
  69. package/dist/configs/recommended/react.d.ts.map +0 -1
  70. package/dist/configs/recommended/react.js +0 -16
  71. package/dist/configs/recommended/recommended.d.ts +0 -4
  72. package/dist/configs/recommended/recommended.d.ts.map +0 -1
  73. package/dist/configs/recommended/recommended.js +0 -22
  74. package/dist/dependencies.d.ts +0 -3
  75. package/dist/dependencies.d.ts.map +0 -1
  76. package/dist/dependencies.js +0 -4
  77. package/dist/shared-rules/index.d.ts +0 -4
  78. package/dist/shared-rules/index.d.ts.map +0 -1
  79. package/dist/shared-rules/index.js +0 -3
  80. package/dist/shared-rules/js-common.d.ts +0 -25
  81. package/dist/shared-rules/js-common.d.ts.map +0 -1
  82. package/dist/shared-rules/js-common.js +0 -50
  83. package/dist/shared-rules/js-imports-exports.d.ts +0 -16
  84. package/dist/shared-rules/js-imports-exports.d.ts.map +0 -1
  85. package/dist/shared-rules/js-imports-exports.js +0 -191
  86. package/dist/shared-rules/jsdoc.d.ts +0 -23
  87. package/dist/shared-rules/jsdoc.d.ts.map +0 -1
  88. package/dist/shared-rules/jsdoc.js +0 -62
  89. package/dist/tsconfig.lib.tsbuildinfo +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"js-common.d.ts","sourceRoot":"","sources":["../../src/shared-rules/js-common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,WA8BlC,CAAC"}
@@ -1,50 +0,0 @@
1
- /**
2
- * ESLint configuration for JavaScript and TypeScript.
3
- *
4
- * This setup replaces the base ESLint `no-unused-vars` rule with
5
- * `@typescript-eslint/no-unused-vars`, which understands TypeScript syntax
6
- * (interfaces, types, enums, modules) and avoids false positives.
7
- * It also enforces clean code style, safe modern JavaScript patterns,
8
- * and proper documentation through **Prettier**, **Unicorn**, and **JSDoc**.
9
- *
10
- * **Required plugins:**
11
- * - typescript
12
- * - typescript-eslint
13
- * - eslint-plugin-unicorn
14
- * - eslint-plugin-prettier ('eslint-config-prettier' must be installed too)
15
- * - eslint-plugin-jsdoc.
16
- *
17
- * **Register the plugins as follows:**
18
- * - '@typescript-eslint': tseslint
19
- * - unicorn: unicornPlugin
20
- * - prettier: prettierPlugin
21
- * - jsdoc: jsdoc.
22
- */
23
- export const jsRulesCommon = {
24
- // TS: allow unused prefixed with "_"
25
- 'no-unused-vars': 'off',
26
- '@typescript-eslint/no-unused-vars': [
27
- 'error',
28
- { argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
29
- ],
30
- // Quote/semi conflict resolution (Prettier handles)
31
- quotes: 'off',
32
- '@typescript-eslint/quotes': 'off',
33
- semi: 'off',
34
- '@typescript-eslint/semi': 'off',
35
- // Unicorn
36
- 'unicorn/filename-case': ['error', { case: 'kebabCase' }],
37
- 'unicorn/prefer-module': 'error',
38
- 'unicorn/no-new-buffer': 'error',
39
- 'unicorn/no-instanceof-array': 'error',
40
- 'unicorn/prefer-includes': 'error',
41
- 'unicorn/prefer-string-replace-all': 'error',
42
- 'unicorn/prefer-top-level-await': 'off',
43
- 'unicorn/prefer-type-error': 'error',
44
- 'unicorn/throw-new-error': 'error',
45
- 'unicorn/no-null': 'off',
46
- 'unicorn/prevent-abbreviations': 'off',
47
- 'unicorn/explicit-length-check': 'warn',
48
- // Prettier
49
- 'prettier/prettier': 'error',
50
- };
@@ -1,16 +0,0 @@
1
- import type { Linter } from 'eslint';
2
- /**
3
- * ESLint rules focused on enforcing structured and sorted imports and exports.
4
- * This configuration disables the default 'sort-imports' rule and relies on
5
- * 'eslint-plugin-simple-import-sort' for predictable grouping and sorting.
6
- *
7
- * **Required plugins:**
8
- * - eslint-plugin-simple-import-sort
9
- * - eslint-plugin-import.
10
- *
11
- * **Register plugins as:**
12
- * - import: importPlugin
13
- * - simple-import-sort: simpleImportSort.
14
- */
15
- export declare const jsRulesImportsExports: Linter.RulesRecord;
16
- //# sourceMappingURL=js-imports-exports.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"js-imports-exports.d.ts","sourceRoot":"","sources":["../../src/shared-rules/js-imports-exports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAmMrC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,WAS1C,CAAC"}
@@ -1,191 +0,0 @@
1
- const IMPORT_GROUPS = [
2
- // dotenv & dotenvx packages
3
- ['^@dotenvx/dotenvx', '^dotenv'],
4
- // Side-effect imports (e.g. polyfills)
5
- [String.raw `^\u0000`],
6
- // Env imports for React Native, Expo, etc.
7
- ['^@env'],
8
- // Node.js built-in modules
9
- [
10
- '^assert',
11
- '^buffer',
12
- '^child_process',
13
- '^cluster',
14
- '^console',
15
- '^constants',
16
- '^crypto',
17
- '^dgram',
18
- '^dns',
19
- '^domain',
20
- '^events',
21
- '^fs',
22
- '^http',
23
- '^https',
24
- '^inspector',
25
- '^module',
26
- '^net',
27
- '^os',
28
- '^path',
29
- '^perf_hooks',
30
- '^process',
31
- '^punycode',
32
- '^querystring',
33
- '^readline',
34
- '^repl',
35
- '^stream',
36
- '^string_decoder',
37
- '^timers',
38
- '^tls',
39
- '^tty',
40
- '^url',
41
- '^util',
42
- '^v8',
43
- '^vm',
44
- '^zlib',
45
- ],
46
- // Node.js built-in modules #2
47
- ['^node:'],
48
- // Node.js backend frameworks
49
- [
50
- '^@fastify',
51
- '^@hapi/hapi',
52
- '^@koa/koa',
53
- '^@nestjs',
54
- '^express',
55
- '^fastify',
56
- '^hapi',
57
- '^koa',
58
- '^loopback',
59
- '^nest',
60
- '^sails',
61
- ],
62
- // Node.js backend middlewares & utilities
63
- [
64
- '^body-parser',
65
- '^connect-redis',
66
- '^cookie-parser',
67
- '^cors',
68
- '^express-rate-limit',
69
- '^express-session',
70
- '^helmet',
71
- '^morgan',
72
- '^passport',
73
- String.raw `^pino-`,
74
- '^redis',
75
- '^winston',
76
- ],
77
- // UI Frameworks (React, Vue, Svelte, etc.)
78
- ['^@angular', '^react', '^solid-js', '^svelte', '^vue'],
79
- // React specific packages
80
- [
81
- '^@tanstack/router',
82
- '^react-dom',
83
- '^react-helmet',
84
- '^react-intl',
85
- '^react-router',
86
- '^react-router-dom',
87
- ],
88
- // Full-stack/SSR frameworks (Next.js, Remix, etc.)
89
- ['^@nuxt/kit', '^@remix-run', '^@sveltejs/kit', '^gatsby', '^next'],
90
- // React Native & Expo
91
- [
92
- '^@expo',
93
- String.raw `^@expo\/`,
94
- '^@react-native',
95
- '^expo',
96
- String.raw `^expo-`,
97
- '^react-native',
98
- '^react-navigation',
99
- ],
100
- // State management libraries
101
- [
102
- '^@reduxjs/toolkit',
103
- '^jotai',
104
- '^mobx',
105
- '^recoil',
106
- '^redux',
107
- '^valtio',
108
- '^zustand',
109
- ],
110
- // Data-fetching libraries
111
- ['^@apollo/client', '^@tanstack/react-query', '^axios', '^graphql', '^swr'],
112
- // UI libraries & design systems
113
- [
114
- '^@chakra-ui',
115
- '^@headlessui/react',
116
- '^@lottiefiles',
117
- '^@material-ui',
118
- '^@mui',
119
- '^@nextui-org/react',
120
- '^@radix-ui',
121
- '^antd',
122
- '^framer-motion',
123
- '^native-base',
124
- '^react-native-paper',
125
- '^shadcn-ui',
126
- '^tailwindcss',
127
- ],
128
- // CSS-in-JS & utility libraries
129
- [
130
- '^@emotion',
131
- '^class-variance-authority',
132
- '^clsx',
133
- '^lucide-react',
134
- '^styled-components',
135
- '^tailwind-merge',
136
- '^twin.macro',
137
- '^tw-animate-css',
138
- ],
139
- // Common icon packages
140
- [
141
- String.raw `^@expo\/vector-icons`,
142
- '^@fortawesome',
143
- '^@tabler/icons-react',
144
- '^lucide',
145
- '^react-feather',
146
- '^react-icons',
147
- '^react-native-feather',
148
- '^react-native-vector-icons',
149
- ],
150
- // Testing libraries and utilities
151
- ['^@testing-library', '^cypress', '^jest', '^playwright', '^vitest'],
152
- // Generic third-party packages (npm scope and plain)
153
- ['^[a-z]', String.raw `^@\w`],
154
- // Monorepo/workspace scoped packages
155
- ['^@my-org/', '^@workspace/'],
156
- // Asset imports (images, fonts, etc.)
157
- [
158
- String.raw `^.+\.(avi|mkv|mov|mp4|webm)$`,
159
- String.raw `^.+\.(mp3|ogg|wav|weba)$`,
160
- String.raw `^.+\.(gif|jpe?g|png|svg|webp)$`,
161
- String.raw `^.+\.lottie$`,
162
- String.raw `^.+\.(eot|otf|ttf|woff|woff2)$`,
163
- ],
164
- // JSON files
165
- [String.raw `^.+\.json$`],
166
- // Stylesheets (css, scss, less, etc.)
167
- [String.raw `^.+\.less$`, String.raw `^.+\.s?css$`],
168
- // Relative imports (parent, sibling, current)
169
- [String.raw `^\.?\.\/`],
170
- ];
171
- /**
172
- * ESLint rules focused on enforcing structured and sorted imports and exports.
173
- * This configuration disables the default 'sort-imports' rule and relies on
174
- * 'eslint-plugin-simple-import-sort' for predictable grouping and sorting.
175
- *
176
- * **Required plugins:**
177
- * - eslint-plugin-simple-import-sort
178
- * - eslint-plugin-import.
179
- *
180
- * **Register plugins as:**
181
- * - import: importPlugin
182
- * - simple-import-sort: simpleImportSort.
183
- */
184
- export const jsRulesImportsExports = {
185
- // Disable the built-in sort-imports rule in favor of plugin
186
- 'sort-imports': 'off',
187
- // Enforce structured and grouped imports using simple-import-sort
188
- 'simple-import-sort/imports': ['error', { groups: IMPORT_GROUPS }],
189
- // Enforce sorted exports
190
- 'simple-import-sort/exports': 'error',
191
- };
@@ -1,23 +0,0 @@
1
- import type { Linter } from 'eslint';
2
- /**
3
- * ESLint rule set focused on enforcing and improving JSDoc usage across
4
- * JavaScript and TypeScript codebases.
5
- *
6
- * This configuration encourages consistent documentation of functions,
7
- * methods, and classes, while avoiding type redundancy when TypeScript
8
- * already provides type information.
9
- *
10
- * **Required plugins:**
11
- * - eslint-plugin-jsdoc.
12
- *
13
- * **Register the plugins above as below:**
14
- * - jsdoc.
15
- *
16
- * **Extend these configs:**
17
- * - jsdoc.configs['flat/contents-typescript-flavor'],
18
- * - jsdoc.configs['flat/logical-typescript-flavor'],
19
- * - jsdoc.configs['flat/requirements-typescript-flavor'],
20
- * - jsdoc.configs['flat/stylistic-typescript-flavor'],.
21
- */
22
- export declare const jsDocRules: Linter.RulesRecord;
23
- //# sourceMappingURL=jsdoc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jsdoc.d.ts","sourceRoot":"","sources":["../../src/shared-rules/jsdoc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,WA+C/B,CAAC"}
@@ -1,62 +0,0 @@
1
- /**
2
- * ESLint rule set focused on enforcing and improving JSDoc usage across
3
- * JavaScript and TypeScript codebases.
4
- *
5
- * This configuration encourages consistent documentation of functions,
6
- * methods, and classes, while avoiding type redundancy when TypeScript
7
- * already provides type information.
8
- *
9
- * **Required plugins:**
10
- * - eslint-plugin-jsdoc.
11
- *
12
- * **Register the plugins above as below:**
13
- * - jsdoc.
14
- *
15
- * **Extend these configs:**
16
- * - jsdoc.configs['flat/contents-typescript-flavor'],
17
- * - jsdoc.configs['flat/logical-typescript-flavor'],
18
- * - jsdoc.configs['flat/requirements-typescript-flavor'],
19
- * - jsdoc.configs['flat/stylistic-typescript-flavor'],.
20
- */
21
- export const jsDocRules = {
22
- 'jsdoc/require-jsdoc': [
23
- 'warn',
24
- {
25
- require: {
26
- FunctionDeclaration: true,
27
- MethodDefinition: true,
28
- ClassDeclaration: true,
29
- },
30
- },
31
- ],
32
- 'jsdoc/require-description': 'warn',
33
- 'jsdoc/require-param': 'error',
34
- 'jsdoc/require-returns': 'error',
35
- 'jsdoc/check-param-names': 'error',
36
- 'jsdoc/check-property-names': 'error',
37
- 'jsdoc/check-tag-names': 'error',
38
- 'jsdoc/check-alignment': 'warn',
39
- 'jsdoc/check-indentation': 'warn',
40
- 'jsdoc/require-description-complete-sentence': 'warn',
41
- 'jsdoc/no-undefined-types': 'error',
42
- 'jsdoc/empty-tags': 'error',
43
- 'jsdoc/no-multi-asterisks': 'warn',
44
- 'jsdoc/no-types': 'off',
45
- 'jsdoc/require-param-type': 'off',
46
- 'jsdoc/require-property-type': 'off',
47
- 'jsdoc/require-throws-type': 'off',
48
- 'jsdoc/require-yields-type': 'off',
49
- 'jsdoc/require-returns-type': 'off',
50
- 'jsdoc/tag-lines': [
51
- 'warn',
52
- 'any',
53
- {
54
- startLines: 0,
55
- endLines: 0,
56
- applyToEndTag: true,
57
- count: 1,
58
- tags: {},
59
- maxBlockLines: null,
60
- },
61
- ],
62
- };