Skip to content

Commit d9c2439

Browse files
committedJan 14, 2025
npm/vue
1 parent fe99b9f commit d9c2439

File tree

7 files changed

+40
-40
lines changed

7 files changed

+40
-40
lines changed
 

‎eslint.config.ts

+23-7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import cy from 'eslint-plugin-cypress/flat'
44
import mocha from 'eslint-plugin-mocha'
55
import globals from 'globals'
66
import path from 'path'
7+
import vue from 'eslint-plugin-vue'
78

89
/**
910
* baseConfig should be imported by other packages that define their own eslint.config.ts
@@ -17,26 +18,34 @@ export const baseConfig: InfiniteDepthConfigWithExtends[] = [
1718
...ts.configs.recommended,
1819
cy.configs.recommended,
1920
mocha.configs.flat.recommended,
21+
...vue.configs['flat/recommended'],
2022
{
2123
// rules that are gold standard, but have many violations
2224
// these are off while developing eslint, but will be set to warn
2325
rules: {
26+
'no-useless-escape': 'off',
27+
'prefer-const': 'off',
28+
'prefer-rest-params': 'off',
29+
'no-prototype-builtins': 'off',
30+
'no-global-assign': 'off',
31+
'no-unsafe-finally': 'off',
32+
2433
'@typescript-eslint/no-unused-expressions': 'off',
2534
'@typescript-eslint/no-require-imports': 'off',
2635
'@typescript-eslint/no-unused-vars': 'off',
27-
'no-useless-escape': 'off',
2836
'@typescript-eslint/no-unsafe-function-type': 'off',
29-
'prefer-const': 'off',
30-
'prefer-rest-params': 'off',
3137
'@typescript-eslint/ban-ts-comment': 'off',
3238
'@typescript-eslint/no-namespace': 'off',
3339
'@typescript-eslint/no-explicit-any': 'off',
34-
'no-prototype-builtins': 'off',
3540
'@typescript-eslint/no-this-alias': 'off',
3641
'@typescript-eslint/triple-slash-reference': 'off',
37-
'no-global-assign': 'off',
38-
'no-unsafe-finally': 'off',
39-
'@typescript-eslint/no-empty-object-type': 'off'
42+
'@typescript-eslint/no-empty-object-type': 'off',
43+
44+
'vue/multi-word-component-names': 'off',
45+
'vue/html-closing-bracket-spacing': 'off',
46+
47+
'cypress/no-unnecessary-waiting': 'off',
48+
'cypress/unsafe-to-chain-command': 'off',
4049
},
4150
},
4251

@@ -71,6 +80,13 @@ export const baseConfig: InfiniteDepthConfigWithExtends[] = [
7180
module: 'readonly',
7281
}
7382
}
83+
},
84+
85+
{
86+
files: ['webpack.config.js'],
87+
languageOptions: {
88+
globals: globals.node
89+
}
7490
}
7591
]
7692

‎npm/vue/.eslintignore

-5
This file was deleted.

‎npm/vue/.eslintrc

-25
This file was deleted.

‎npm/vue/cypress/component/setup/HelloWorld.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import { ref } from 'vue'
1313
1414
defineProps<{
15-
msg: String
15+
msg: string
1616
}>()
1717
1818
const count = ref(0)

‎npm/vue/eslint.config.ts

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { baseConfig } from '../../eslint.config'
2+
import ts from 'typescript-eslint'
3+
import globals from 'globals'
4+
5+
export default [
6+
...baseConfig,
7+
{
8+
files: ['**/*.vue'],
9+
languageOptions: {
10+
parserOptions: {
11+
parser: ts.parser
12+
}
13+
}
14+
}
15+
]

‎npm/vue/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"check-ts": "yarn tsd && vue-tsc --noEmit",
1010
"cy:open": "node ../../scripts/cypress.js open --component --project ${PWD}",
1111
"cy:run": "node ../../scripts/cypress.js run --component --project ${PWD}",
12-
"lint": "eslint --ext .js,.jsx,.ts,.tsx,.json,.vue .",
12+
"lint": "eslint .",
1313
"test": "yarn cy:run",
1414
"tsd": "yarn build && yarn tsc -p test-tsd/tsconfig.json",
1515
"watch": "yarn build --watch --watch.exclude ./dist/**/*"

‎npm/vue/rollup.config.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const config = {
88
],
99
output: {
1010
globals: {
11-
vue: 'Vue',
1211
vue: 'Vue',
1312
'@vue/compiler-dom': 'VueCompilerDOM',
1413
'@vue/server-renderer': 'VueServerRenderer'

0 commit comments

Comments
 (0)
Please sign in to comment.