mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
chore: setup eslint for prohibited syntax (#8516)
This commit is contained in:
parent
9deca34d1d
commit
6e24ba42a2
18
.eslintrc
18
.eslintrc
@ -1,4 +1,20 @@
|
|||||||
{
|
{
|
||||||
"root": true,
|
"root": true,
|
||||||
"extends": ["@vant"]
|
"extends": ["@vant"],
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": ["src/**/*"],
|
||||||
|
"excludedFiles": ["**/test/*", "**/demo/*"],
|
||||||
|
"rules": {
|
||||||
|
"prefer-object-spread": "off",
|
||||||
|
// since we target ES2015 for baseline support, we need to forbid object
|
||||||
|
// rest spread usage (both assign and destructure)
|
||||||
|
"no-restricted-syntax": [
|
||||||
|
"error",
|
||||||
|
"ObjectExpression > SpreadElement",
|
||||||
|
"ObjectPattern > RestElement"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ module.exports = {
|
|||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
files: ['*.vue'],
|
files: ['*.vue'],
|
||||||
parser: require.resolve('vue-eslint-parser')
|
parser: require.resolve('vue-eslint-parser'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
files: ['**/*.md/*.js', '**/*.md/*.ts'],
|
files: ['**/*.md/*.js', '**/*.md/*.ts'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user