@kouts/eslint-config 1.3.2 → 1.3.3
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/dist/index.cjs +551 -0
- package/dist/index.d.cts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +546 -0
- package/dist/prettier.cjs +12 -0
- package/dist/prettier.d.cts +5 -0
- package/dist/prettier.d.ts +5 -0
- package/dist/prettier.js +10 -0
- package/package.json +4 -1
- package/.github/workflows/release.yml +0 -77
- package/.husky/commit-msg +0 -1
- package/.husky/pre-commit +0 -1
- package/.nvmrc +0 -1
- package/CHANGELOG.md +0 -20
- package/README_V0.md +0 -76
- package/commitlint.config.js +0 -6
- package/eslint.config.js +0 -8
- package/eslint.config.ts +0 -3
- package/fixtures/vue3-ts-vite-starter-template/.nvmrc +0 -1
- package/fixtures/vue3-ts-vite-starter-template/README.md +0 -2
- package/fixtures/vue3-ts-vite-starter-template/env.d.ts +0 -8
- package/fixtures/vue3-ts-vite-starter-template/eslint.config.js +0 -12
- package/fixtures/vue3-ts-vite-starter-template/index.html +0 -27
- package/fixtures/vue3-ts-vite-starter-template/package.json +0 -50
- package/fixtures/vue3-ts-vite-starter-template/pnpm-lock.yaml +0 -3253
- package/fixtures/vue3-ts-vite-starter-template/postcss.config.js +0 -28
- package/fixtures/vue3-ts-vite-starter-template/prettier.config.js +0 -3
- package/fixtures/vue3-ts-vite-starter-template/public/favicon.ico +0 -0
- package/fixtures/vue3-ts-vite-starter-template/src/App.vue +0 -14
- package/fixtures/vue3-ts-vite-starter-template/src/assets/logo.svg +0 -10
- package/fixtures/vue3-ts-vite-starter-template/src/components/HelloWorld.vue +0 -39
- package/fixtures/vue3-ts-vite-starter-template/src/layouts/default/Default.vue +0 -12
- package/fixtures/vue3-ts-vite-starter-template/src/layouts/default/DefaultFooter.vue +0 -10
- package/fixtures/vue3-ts-vite-starter-template/src/layouts/default/DefaultNav.vue +0 -74
- package/fixtures/vue3-ts-vite-starter-template/src/main.ts +0 -13
- package/fixtures/vue3-ts-vite-starter-template/src/router/index.ts +0 -32
- package/fixtures/vue3-ts-vite-starter-template/src/scss/app.scss +0 -4
- package/fixtures/vue3-ts-vite-starter-template/src/scss/variables.scss +0 -5
- package/fixtures/vue3-ts-vite-starter-template/src/stores/counter.ts +0 -16
- package/fixtures/vue3-ts-vite-starter-template/src/views/About.vue +0 -11
- package/fixtures/vue3-ts-vite-starter-template/src/views/Home.vue +0 -16
- package/fixtures/vue3-ts-vite-starter-template/tailwind.config.js +0 -12
- package/fixtures/vue3-ts-vite-starter-template/tests/HelloWorld.spec.ts +0 -10
- package/fixtures/vue3-ts-vite-starter-template/tests/utils.ts +0 -1
- package/fixtures/vue3-ts-vite-starter-template/tests/vitest.global-setup.ts +0 -3
- package/fixtures/vue3-ts-vite-starter-template/tests/vitest.globals.ts +0 -22
- package/fixtures/vue3-ts-vite-starter-template/tsconfig.json +0 -44
- package/fixtures/vue3-ts-vite-starter-template/vite.config.ts +0 -47
- package/lint-staged.config.js +0 -3
- package/prettier.config.js +0 -3
- package/release.config.js +0 -33
- package/src/index.ts +0 -153
- package/src/prettier.ts +0 -12
- package/src/shims.d.ts +0 -4
- package/src/typescript.ts +0 -37
- package/src/vue.ts +0 -83
- package/tsconfig.json +0 -17
package/src/typescript.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { Linter } from 'eslint'
|
|
2
|
-
import { plugins } from 'neostandard'
|
|
3
|
-
|
|
4
|
-
export const typescript: Linter.Config[] = [
|
|
5
|
-
...(plugins['typescript-eslint'].configs.recommended as Linter.Config[]),
|
|
6
|
-
{
|
|
7
|
-
name: 'kouts/typescript',
|
|
8
|
-
rules: {
|
|
9
|
-
// Prefer T[] instead of Array<T>
|
|
10
|
-
'@typescript-eslint/array-type': ['error', { default: 'array' }],
|
|
11
|
-
|
|
12
|
-
// Prefer type over interface for objects
|
|
13
|
-
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
|
|
14
|
-
|
|
15
|
-
// Fix type imports
|
|
16
|
-
'@typescript-eslint/consistent-type-imports': [
|
|
17
|
-
'error',
|
|
18
|
-
{
|
|
19
|
-
prefer: 'type-imports',
|
|
20
|
-
fixStyle: 'inline-type-imports',
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
|
|
24
|
-
// Allow _ for unused variables
|
|
25
|
-
'@typescript-eslint/no-unused-vars': [
|
|
26
|
-
'error',
|
|
27
|
-
{
|
|
28
|
-
args: 'none',
|
|
29
|
-
caughtErrors: 'none',
|
|
30
|
-
ignoreRestSiblings: true,
|
|
31
|
-
vars: 'all',
|
|
32
|
-
argsIgnorePattern: '^_',
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
]
|
package/src/vue.ts
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import type { Linter } from 'eslint'
|
|
2
|
-
import pluginVue from 'eslint-plugin-vue'
|
|
3
|
-
import { plugins } from 'neostandard'
|
|
4
|
-
|
|
5
|
-
type Options = {
|
|
6
|
-
version?: 2 | 3
|
|
7
|
-
ts?: boolean
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const vue = (options?: Options) => {
|
|
11
|
-
const opts: Options = {
|
|
12
|
-
version: 3,
|
|
13
|
-
ts: true,
|
|
14
|
-
...options,
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const vueConfig = opts.version === 3 ? pluginVue.configs['flat/recommended'] : pluginVue.configs['flat/vue2-recommended']
|
|
18
|
-
|
|
19
|
-
const languageOptions = opts.ts
|
|
20
|
-
? {
|
|
21
|
-
languageOptions: {
|
|
22
|
-
parserOptions: {
|
|
23
|
-
parser: plugins['typescript-eslint'].parser,
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
}
|
|
27
|
-
: {}
|
|
28
|
-
|
|
29
|
-
const config: Linter.Config[] = [
|
|
30
|
-
...vueConfig,
|
|
31
|
-
{
|
|
32
|
-
name: 'kouts/vue',
|
|
33
|
-
files: ['*.vue', '**/*.vue'],
|
|
34
|
-
...languageOptions,
|
|
35
|
-
rules: {
|
|
36
|
-
// Overrides for vue/(vue3-)recommended preset
|
|
37
|
-
'vue/max-attributes-per-line': 'off',
|
|
38
|
-
'vue/singleline-html-element-content-newline': 'off',
|
|
39
|
-
|
|
40
|
-
// Strengthen vue/(vue3-)recommended preset for autofix
|
|
41
|
-
// https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/configs/recommended.js
|
|
42
|
-
'vue/attributes-order': 'error',
|
|
43
|
-
'vue/component-tags-order': 'error',
|
|
44
|
-
'vue/no-lone-template': 'error',
|
|
45
|
-
'vue/no-multiple-slot-args': 'error',
|
|
46
|
-
'vue/no-v-html': 'error',
|
|
47
|
-
'vue/order-in-components': 'error',
|
|
48
|
-
'vue/this-in-template': 'error',
|
|
49
|
-
'vue/require-prop-types': 'error',
|
|
50
|
-
|
|
51
|
-
// Enforce PascalCase for Vue components
|
|
52
|
-
'vue/component-name-in-template-casing': ['error', 'PascalCase', { registeredComponentsOnly: false, ignores: [] }],
|
|
53
|
-
|
|
54
|
-
// Do not allow inline styles
|
|
55
|
-
'vue/no-static-inline-styles': ['error', { allowBinding: false }],
|
|
56
|
-
|
|
57
|
-
// Require explicit emits
|
|
58
|
-
'vue/require-explicit-emits': 'error',
|
|
59
|
-
|
|
60
|
-
// Require component to have a name property
|
|
61
|
-
'vue/require-name-property': 'error',
|
|
62
|
-
|
|
63
|
-
// Require components that don't have any content to self-close
|
|
64
|
-
'vue/html-self-closing': [
|
|
65
|
-
'error',
|
|
66
|
-
{
|
|
67
|
-
html: {
|
|
68
|
-
void: 'always',
|
|
69
|
-
normal: 'never',
|
|
70
|
-
component: 'always',
|
|
71
|
-
},
|
|
72
|
-
svg: 'always',
|
|
73
|
-
math: 'always',
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
]
|
|
79
|
-
|
|
80
|
-
return config
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export { vue }
|
package/tsconfig.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ESNext",
|
|
4
|
-
"baseUrl": ".",
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "Bundler",
|
|
7
|
-
"strict": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"skipLibCheck": true
|
|
10
|
-
},
|
|
11
|
-
"include": [
|
|
12
|
-
"**/*.ts"
|
|
13
|
-
],
|
|
14
|
-
"exclude": [
|
|
15
|
-
"./fixtures/**/*.*"
|
|
16
|
-
]
|
|
17
|
-
}
|