Nuxt/.eslintrc

151 lines
3.4 KiB
Plaintext
Raw Normal View History

2021-03-18 14:26:41 +00:00
{
"ignorePatterns": [
"dist",
"node_modules",
"packages/schema/schema",
"**/*.tmpl.*",
"sw.js"
],
2023-07-07 19:28:37 +00:00
"$schema": "https://json.schemastore.org/eslintrc",
2021-03-18 14:26:41 +00:00
"globals": {
2021-04-23 20:30:43 +00:00
"NodeJS": true,
"$fetch": true
2021-03-18 14:26:41 +00:00
},
"plugins": [
"jsdoc",
"no-only-tests"
],
2021-03-18 14:26:41 +00:00
"extends": [
2021-04-15 18:49:29 +00:00
"plugin:jsdoc/recommended",
"@nuxtjs/eslint-config-typescript",
"plugin:import/typescript"
2021-03-18 14:26:41 +00:00
],
"rules": {
"sort-imports": [
"error",
{
"ignoreDeclarationSort": true
}
],
2023-05-05 12:53:49 +00:00
"no-only-tests/no-only-tests": "error",
"unicorn/prefer-node-protocol": "error",
"no-console": "warn",
"vue/multi-word-component-names": "off",
2021-04-15 18:49:29 +00:00
"vue/one-component-per-file": "off",
"vue/require-default-prop": "off",
"vue/no-multiple-template-root": "off",
2023-01-22 16:46:45 +00:00
"vue/no-v-model-argument": "off",
2021-04-15 18:49:29 +00:00
"jsdoc/require-jsdoc": "off",
"jsdoc/require-param": "off",
"jsdoc/require-returns": "off",
"jsdoc/require-param-type": "off",
"no-redeclare": "off",
"import/order": [
"error",
{
"pathGroups": [
{
"pattern": "#vue-router",
"group": "external"
}
]
}
],
"import/no-restricted-paths": [
"error",
{
"zones": [
{
"from": "packages/nuxt/src/!(core)/**/*",
"target": "packages/nuxt/src/core",
"message": "core should not directly import from modules."
},
{
"from": "packages/nuxt/src/!(app)/**/*",
"target": "packages/nuxt/src/app",
"message": "app should not directly import from modules."
},
{
"from": "packages/nuxt/src/app/**/index.ts",
"target": "packages/nuxt/src",
"message": "should not import from barrel/index files"
},
{
"from": "packages/nitro",
"target": "packages/!(nitro)/**/*",
"message": "nitro should not directly import other packages."
}
]
}
],
"@typescript-eslint/consistent-type-imports": [
"error",
{
"disallowTypeAnnotations": false
}
],
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-expect-error": "allow-with-description",
"ts-ignore": true
}
],
2023-05-05 09:25:44 +00:00
"@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"jsdoc/check-tag-names": [
"error",
{
"definedTags": [
"__NO_SIDE_EFFECTS__"
]
}
]
2021-04-15 18:49:29 +00:00
},
2023-08-08 20:55:29 +00:00
"overrides": [
{
"files": [
"packages/schema/**"
],
"rules": {
"jsdoc/no-undefined-types": "off",
"jsdoc/valid-types": "off",
"jsdoc/check-tag-names": [
"error",
{
"definedTags": [
"experimental"
]
}
]
}
},
{
"files": [
"packages/nuxt/src/app/**",
"test/**",
"**/runtime/**"
],
"rules": {
"no-console": "off"
}
2023-08-08 20:55:29 +00:00
}
],
2021-04-15 18:49:29 +00:00
"settings": {
"jsdoc": {
"ignoreInternal": true,
2021-04-15 18:49:29 +00:00
"tagNamePreference": {
"warning": "warning",
"note": "note"
}
}
}
2021-03-18 14:26:41 +00:00
}