@curev/eslint-config 0.2.1 → 0.3.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/.eslintignore +1 -0
- package/.github/workflows/release.yml +37 -0
- package/.vscode/settings.json +36 -0
- package/CHANGELOG.md +740 -0
- package/README.md +70 -0
- package/eslint.config.ts +3 -0
- package/fixtures/input/css.css +10 -0
- package/fixtures/input/html.html +17 -0
- package/fixtures/input/javascript.js +69 -0
- package/fixtures/input/jsx.jsx +27 -0
- package/fixtures/input/markdown.md +34 -0
- package/fixtures/input/svelte.svelte +8 -0
- package/fixtures/input/toml.toml +23 -0
- package/fixtures/input/tsx.tsx +32 -0
- package/fixtures/input/typescript.ts +84 -0
- package/fixtures/input/vue-ts.vue +35 -0
- package/fixtures/input/vue.vue +27 -0
- package/fixtures/output/all/javascript.js +72 -0
- package/fixtures/output/all/jsx.jsx +26 -0
- package/fixtures/output/all/markdown.md +33 -0
- package/fixtures/output/all/svelte.svelte +8 -0
- package/fixtures/output/all/toml.toml +23 -0
- package/fixtures/output/all/tsx.tsx +32 -0
- package/fixtures/output/all/typescript.ts +83 -0
- package/fixtures/output/all/vue-ts.vue +35 -0
- package/fixtures/output/all/vue.vue +24 -0
- package/fixtures/output/js/javascript.js +72 -0
- package/fixtures/output/js/markdown.md +33 -0
- package/fixtures/output/js/toml.toml +23 -0
- package/fixtures/output/no-markdown-with-formatters/javascript.js +72 -0
- package/fixtures/output/no-markdown-with-formatters/jsx.jsx +24 -0
- package/fixtures/output/no-markdown-with-formatters/markdown.md +33 -0
- package/fixtures/output/no-markdown-with-formatters/toml.toml +23 -0
- package/fixtures/output/no-markdown-with-formatters/tsx.tsx +23 -0
- package/fixtures/output/no-markdown-with-formatters/typescript.ts +83 -0
- package/fixtures/output/no-style/javascript.js +72 -0
- package/fixtures/output/no-style/jsx.jsx +21 -0
- package/fixtures/output/no-style/toml.toml +23 -0
- package/fixtures/output/no-style/typescript.ts +80 -0
- package/fixtures/output/no-style/vue-ts.vue +35 -0
- package/fixtures/output/no-style/vue.vue +24 -0
- package/fixtures/output/tab-double-quotes/javascript.js +72 -0
- package/fixtures/output/tab-double-quotes/jsx.jsx +26 -0
- package/fixtures/output/tab-double-quotes/markdown.md +33 -0
- package/fixtures/output/tab-double-quotes/toml.toml +23 -0
- package/fixtures/output/tab-double-quotes/tsx.tsx +32 -0
- package/fixtures/output/tab-double-quotes/typescript.ts +83 -0
- package/fixtures/output/tab-double-quotes/vue-ts.vue +35 -0
- package/fixtures/output/tab-double-quotes/vue.vue +24 -0
- package/fixtures/output/ts-override/javascript.js +72 -0
- package/fixtures/output/ts-override/jsx.jsx +26 -0
- package/fixtures/output/ts-override/markdown.md +33 -0
- package/fixtures/output/ts-override/toml.toml +23 -0
- package/fixtures/output/ts-override/tsx.tsx +32 -0
- package/fixtures/output/ts-override/typescript.ts +83 -0
- package/fixtures/output/ts-override/vue-ts.vue +35 -0
- package/fixtures/output/ts-override/vue.vue +24 -0
- package/fixtures/output/with-formatters/css.css +11 -0
- package/fixtures/output/with-formatters/html.html +28 -0
- package/fixtures/output/with-formatters/javascript.js +72 -0
- package/fixtures/output/with-formatters/jsx.jsx +26 -0
- package/fixtures/output/with-formatters/markdown.md +34 -0
- package/fixtures/output/with-formatters/toml.toml +23 -0
- package/fixtures/output/with-formatters/tsx.tsx +32 -0
- package/fixtures/output/with-formatters/typescript.ts +83 -0
- package/fixtures/output/with-formatters/vue-ts.vue +38 -0
- package/fixtures/output/with-formatters/vue.vue +24 -0
- package/package.json +130 -12
- package/src/configs/comments.ts +19 -0
- package/src/configs/formatters.ts +187 -0
- package/src/configs/ignores.ts +10 -0
- package/src/configs/imports.ts +46 -0
- package/src/configs/index.ts +21 -0
- package/src/configs/javascript.ts +277 -0
- package/src/configs/jsdoc.ts +41 -0
- package/src/configs/jsonc.ts +86 -0
- package/src/configs/markdown.ts +110 -0
- package/src/configs/node.ts +24 -0
- package/src/configs/perfectionist.ts +18 -0
- package/src/configs/react.ts +111 -0
- package/src/configs/sort.ts +223 -0
- package/src/configs/stylistic.ts +52 -0
- package/src/configs/svelte.ts +107 -0
- package/src/configs/test.ts +54 -0
- package/src/configs/toml.ts +72 -0
- package/src/configs/typescript.ts +171 -0
- package/src/configs/unicorn.ts +41 -0
- package/src/configs/unocss.ts +43 -0
- package/src/configs/vue.ts +170 -0
- package/src/configs/yaml.ts +72 -0
- package/src/factory.ts +255 -0
- package/src/globs.ts +81 -0
- package/src/index.ts +9 -0
- package/src/plugins.ts +10 -0
- package/src/stub.d.ts +3 -0
- package/src/types.ts +364 -0
- package/src/utils.ts +76 -0
- package/src/vender/prettier-types.ts +136 -0
- package/test/cli.spec.ts +90 -0
- package/test/fixtures.test.ts +127 -0
- package/tsconfig.json +17 -0
- package/tsup.config.ts +8 -0
- package/index.js +0 -5
package/.eslintignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fixtures/**
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v3
|
|
13
|
+
with:
|
|
14
|
+
fetch-depth: 0
|
|
15
|
+
|
|
16
|
+
- uses: actions/setup-node@v3
|
|
17
|
+
with:
|
|
18
|
+
node-version: 16.x
|
|
19
|
+
registry-url: 'https://registry.npmjs.org'
|
|
20
|
+
|
|
21
|
+
- name: Set up pnpm
|
|
22
|
+
uses: pnpm/action-setup@v2.2.4
|
|
23
|
+
with:
|
|
24
|
+
version: 8.6.5
|
|
25
|
+
|
|
26
|
+
- run: npx changelogithub
|
|
27
|
+
continue-on-error: true
|
|
28
|
+
env:
|
|
29
|
+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
30
|
+
|
|
31
|
+
- name: Install Dependencies
|
|
32
|
+
run: pnpm install
|
|
33
|
+
|
|
34
|
+
- name: Publish to NPM
|
|
35
|
+
run: pnpm publish --access public --no-git-checks --registry https://registry.npmjs.org
|
|
36
|
+
env:
|
|
37
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Enable the ESlint flat config support
|
|
3
|
+
"eslint.experimental.useFlatConfig": true,
|
|
4
|
+
|
|
5
|
+
// Disable the default formatter, use eslint instead
|
|
6
|
+
"prettier.enable": false,
|
|
7
|
+
"editor.formatOnSave": false,
|
|
8
|
+
|
|
9
|
+
// Auto fix
|
|
10
|
+
"editor.codeActionsOnSave": {
|
|
11
|
+
"source.fixAll.eslint": "explicit",
|
|
12
|
+
"source.organizeImports": "never"
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
// Enable eslint for all supported languages
|
|
16
|
+
"eslint.validate": [
|
|
17
|
+
"javascript",
|
|
18
|
+
"javascriptreact",
|
|
19
|
+
"typescript",
|
|
20
|
+
"typescriptreact",
|
|
21
|
+
"vue",
|
|
22
|
+
"html",
|
|
23
|
+
"markdown",
|
|
24
|
+
"json",
|
|
25
|
+
"jsonc",
|
|
26
|
+
"yaml",
|
|
27
|
+
"toml"
|
|
28
|
+
],
|
|
29
|
+
|
|
30
|
+
"pair-diff.patterns": [
|
|
31
|
+
{
|
|
32
|
+
"source": "./fixtures/output/**/*.*",
|
|
33
|
+
"target": "./fixtures/input/<base>"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|