@st1ggy/linter-config 2.42.0 → 4.0.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/README.md +93 -17
- package/index.d.ts +32 -0
- package/package.json +107 -46
- package/packages/biome/LICENSE +201 -0
- package/packages/biome/biome.json +5 -0
- package/packages/biome/configs/biome.common.json +44 -0
- package/packages/biome/configs/biome.next.json +10 -0
- package/packages/biome/configs/biome.react.json +12 -0
- package/packages/biome/configs/biome.svelte.json +10 -0
- package/packages/biome/docs/README.md +19 -0
- package/packages/eslint/data/linter-config-inventory.json +9325 -0
- package/packages/eslint/docs/RULE_MAPPING.md +50 -0
- package/packages/eslint/scripts/init-common.sh +4 -0
- package/packages/eslint/scripts/init-next.sh +4 -0
- package/packages/eslint/scripts/init-react.sh +4 -0
- package/packages/eslint/scripts/init-svelte.sh +4 -0
- package/packages/eslint/scripts/inventory.mjs +178 -0
- package/packages/eslint/scripts/linter-init.mjs +209 -0
- package/{src → packages/eslint/src}/eslint/configs/config.import.js +10 -10
- package/{src → packages/eslint/src}/eslint/configs/config.next.js +5 -2
- package/{src → packages/eslint/src}/eslint/configs/config.prettier.js +2 -2
- package/{src → packages/eslint/src}/eslint/configs/config.typescript.js +2 -2
- package/packages/eslint/src/eslint/configs/constants.js +7 -0
- package/{src/eslint/configs/config.svelte.js → packages/eslint/src/eslint/configs/svelte-stack.js} +5 -10
- package/{src/eslint/eslint.config.svelte.js → packages/eslint/src/eslint/eslint-svelte.config.js} +1 -1
- package/packages/eslint/src/examples/example.scss +3 -0
- package/packages/eslint/src/examples/example.svelte +5 -0
- package/{src → packages/eslint/src}/index.js +2 -2
- package/scripts/README.md +38 -0
- package/scripts/init-common.sh +0 -12
- package/scripts/init-react.sh +0 -12
- package/scripts/init-svelte.sh +0 -12
- package/scripts/patch.sh +0 -3
- package/src/eslint/configs/constants.js +0 -1
- /package/{scripts → packages/eslint/scripts}/remove-current.sh +0 -0
- /package/{src → packages/eslint/src}/eslint/configs/config.common.js +0 -0
- /package/{src → packages/eslint/src}/eslint/configs/config.gitignore.js +0 -0
- /package/{src → packages/eslint/src}/eslint/configs/config.react.js +0 -0
- /package/{src → packages/eslint/src}/eslint/configs/config.sonarjs.js +0 -0
- /package/{src → packages/eslint/src}/eslint/configs/config.unicorn.js +0 -0
- /package/{src → packages/eslint/src}/eslint/eslint.config.common.js +0 -0
- /package/{src → packages/eslint/src}/eslint/eslint.config.next.js +0 -0
- /package/{src → packages/eslint/src}/eslint/eslint.config.react.js +0 -0
- /package/{src → packages/eslint/src}/examples/example.ts +0 -0
- /package/{src/prettier/prettier.config.svelte.js → packages/eslint/src/prettier/prettier-svelte.config.js} +0 -0
- /package/{src → packages/eslint/src}/prettier/prettier.config.common.js +0 -0
- /package/{src → packages/eslint/src}/stylelint/stylelint.config.scss.js +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Consumer config helpers (monorepo root)
|
|
2
|
+
|
|
3
|
+
From this repository root, use the npm scripts in the root [`package.json`](../package.json). They run the CLI with **`--eslint --biome --common`** (full wrapper set for this repo’s default stack):
|
|
4
|
+
|
|
5
|
+
| Script | Effect |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| `npm run config:init` | `init` — create missing `eslint.config.js`, `prettier.config.js`, `stylelint.config.js`, `biome.json` |
|
|
8
|
+
| `npm run config:reinit` | `reinit` — overwrite those four files |
|
|
9
|
+
| `npm run config:create` | same as `config:init` |
|
|
10
|
+
|
|
11
|
+
Direct CLI (paths from repo root):
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
node packages/eslint/scripts/linter-init.mjs init --eslint --biome --react
|
|
15
|
+
node packages/eslint/scripts/linter-init.mjs reinit --biome --svelte --dir ./my-app
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Flags (published package)
|
|
19
|
+
|
|
20
|
+
The **`linter-config`** binary is declared in [`package.json`](../package.json) `bin`. In another project:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx linter-config init --eslint --common
|
|
24
|
+
npx linter-config init --biome --next
|
|
25
|
+
npm exec linter-config -- reinit --eslint --biome --svelte
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Without installing first:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx --yes --package @st1ggy/linter-config linter-config init --eslint --react
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
- **`--eslint`** — `eslint.config.js` + `prettier.config.js` + `stylelint.config.js` (one stack).
|
|
35
|
+
- **`--biome`** — `biome.json`.
|
|
36
|
+
- **Stack (optional, default common):** `--common` | `--react` | `--next` | `--svelte` (at most one).
|
|
37
|
+
|
|
38
|
+
Shell shortcuts in [`packages/eslint/scripts/`](../packages/eslint/scripts/) (`init-common.sh`, etc.) call **`init --eslint`** with the matching stack only (no Biome).
|
package/scripts/init-common.sh
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
declare -A postfix_map=(
|
|
4
|
-
[eslint]="common"
|
|
5
|
-
[stylelint]="scss"
|
|
6
|
-
[prettier]="common"
|
|
7
|
-
)
|
|
8
|
-
|
|
9
|
-
for l in eslint stylelint prettier; do
|
|
10
|
-
echo "creating $l.config.js with ${l}-${postfix_map[$l]}"
|
|
11
|
-
echo "export { default } from '@st1ggy/linter-config/${l}-${postfix_map[$l]}';" > $l.config.js;
|
|
12
|
-
done
|
package/scripts/init-react.sh
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
declare -A postfix_map=(
|
|
4
|
-
[eslint]="react"
|
|
5
|
-
[stylelint]="scss"
|
|
6
|
-
[prettier]="common"
|
|
7
|
-
)
|
|
8
|
-
|
|
9
|
-
for l in eslint stylelint prettier; do
|
|
10
|
-
echo "creating $l.config.js with ${l}-${postfix_map[$l]}"
|
|
11
|
-
echo "export { default } from '@st1ggy/linter-config/${l}-${postfix_map[$l]}';" > $l.config.js;
|
|
12
|
-
done
|
package/scripts/init-svelte.sh
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
declare -A postfix_map=(
|
|
4
|
-
[eslint]="svelte"
|
|
5
|
-
[stylelint]="scss"
|
|
6
|
-
[prettier]="svelte"
|
|
7
|
-
)
|
|
8
|
-
|
|
9
|
-
for l in eslint stylelint prettier; do
|
|
10
|
-
echo "creating $l.config.js with ${l}-${postfix_map[$l]}"
|
|
11
|
-
echo "export { default } from '@st1ggy/linter-config/${l}-${postfix_map[$l]}';" > $l.config.js;
|
|
12
|
-
done
|
package/scripts/patch.sh
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const files = ['**/*.{js,jsx,ts,tsx,mts,cts,mjs,cjs,vue,svelte}']
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|