2021-03-18 14:26:41 +00:00
|
|
|
{
|
2023-08-08 21:32:13 +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
|
|
|
},
|
2023-11-06 15:38:45 +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",
|
2021-10-02 18:40:10 +00:00
|
|
|
"@nuxtjs/eslint-config-typescript",
|
|
|
|
"plugin:import/typescript"
|
2021-03-18 14:26:41 +00:00
|
|
|
],
|
|
|
|
"rules": {
|
2023-04-07 16:02:47 +00:00
|
|
|
"sort-imports": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"ignoreDeclarationSort": true
|
|
|
|
}
|
|
|
|
],
|
2023-05-05 12:53:49 +00:00
|
|
|
"no-only-tests/no-only-tests": "error",
|
2022-04-15 15:19:05 +00:00
|
|
|
"unicorn/prefer-node-protocol": "error",
|
2023-09-19 21:26:15 +00:00
|
|
|
"no-console": "warn",
|
2022-03-07 14:49:13 +00:00
|
|
|
"vue/multi-word-component-names": "off",
|
2021-04-15 18:49:29 +00:00
|
|
|
"vue/one-component-per-file": "off",
|
2021-07-15 11:28:04 +00:00
|
|
|
"vue/require-default-prop": "off",
|
2022-04-01 14:06:48 +00:00
|
|
|
"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",
|
2021-10-02 18:40:10 +00:00
|
|
|
"jsdoc/require-param-type": "off",
|
2022-07-07 16:26:04 +00:00
|
|
|
"no-redeclare": "off",
|
2023-03-03 10:58:15 +00:00
|
|
|
"import/order": [
|
2023-03-14 10:09:50 +00:00
|
|
|
"error",
|
|
|
|
{
|
2023-03-03 10:58:15 +00:00
|
|
|
"pathGroups": [
|
2023-05-09 17:08:07 +00:00
|
|
|
{
|
|
|
|
"pattern": "#vue-router",
|
|
|
|
"group": "external"
|
2023-03-03 10:58:15 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2022-02-17 12:01:24 +00:00
|
|
|
"import/no-restricted-paths": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"zones": [
|
|
|
|
{
|
2022-04-20 08:52:39 +00:00
|
|
|
"from": "packages/nuxt/src/!(core)/**/*",
|
|
|
|
"target": "packages/nuxt/src/core",
|
2022-02-17 12:01:24 +00:00
|
|
|
"message": "core should not directly import from modules."
|
|
|
|
},
|
|
|
|
{
|
2022-04-20 08:52:39 +00:00
|
|
|
"from": "packages/nuxt/src/!(app)/**/*",
|
|
|
|
"target": "packages/nuxt/src/app",
|
2022-02-17 12:01:24 +00:00
|
|
|
"message": "app should not directly import from modules."
|
|
|
|
},
|
2023-10-30 21:05:02 +00:00
|
|
|
{
|
|
|
|
"from": "packages/nuxt/src/app/**/index.ts",
|
|
|
|
"target": "packages/nuxt/src",
|
|
|
|
"message": "should not import from barrel/index files"
|
|
|
|
},
|
2022-02-17 12:01:24 +00:00
|
|
|
{
|
|
|
|
"from": "packages/nitro",
|
|
|
|
"target": "packages/!(nitro)/**/*",
|
|
|
|
"message": "nitro should not directly import other packages."
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2022-12-11 21:44:52 +00:00
|
|
|
"@typescript-eslint/consistent-type-imports": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"disallowTypeAnnotations": false
|
|
|
|
}
|
|
|
|
],
|
2023-04-14 12:53:21 +00:00
|
|
|
"@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",
|
2022-02-17 12:01:24 +00:00
|
|
|
"@typescript-eslint/no-unused-vars": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"argsIgnorePattern": "^_",
|
|
|
|
"varsIgnorePattern": "^_",
|
|
|
|
"ignoreRestSiblings": true
|
|
|
|
}
|
2023-06-07 10:11:24 +00:00
|
|
|
],
|
2023-08-08 21:32:13 +00:00
|
|
|
"jsdoc/check-tag-names": [
|
|
|
|
"error",
|
|
|
|
{
|
2023-11-06 15:38:45 +00:00
|
|
|
"definedTags": [
|
|
|
|
"__NO_SIDE_EFFECTS__"
|
|
|
|
]
|
2023-08-08 21:32:13 +00:00
|
|
|
}
|
|
|
|
]
|
2021-04-15 18:49:29 +00:00
|
|
|
},
|
2023-08-08 20:55:29 +00:00
|
|
|
"overrides": [
|
|
|
|
{
|
2023-11-06 15:38:45 +00:00
|
|
|
"files": [
|
|
|
|
"packages/schema/**"
|
|
|
|
],
|
|
|
|
"rules": {
|
|
|
|
"jsdoc/no-undefined-types": "off",
|
|
|
|
"jsdoc/valid-types": "off",
|
|
|
|
"jsdoc/check-tag-names": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"definedTags": [
|
|
|
|
"experimental"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2023-09-19 21:26:15 +00:00
|
|
|
},
|
|
|
|
{
|
2023-11-06 15:38:45 +00:00
|
|
|
"files": [
|
|
|
|
"packages/nuxt/src/app/**",
|
|
|
|
"test/**",
|
|
|
|
"**/runtime/**"
|
|
|
|
],
|
2023-09-19 21:26:15 +00:00
|
|
|
"rules": {
|
|
|
|
"no-console": "off"
|
|
|
|
}
|
2023-08-08 20:55:29 +00:00
|
|
|
}
|
|
|
|
],
|
2021-04-15 18:49:29 +00:00
|
|
|
"settings": {
|
|
|
|
"jsdoc": {
|
2023-03-14 10:09:50 +00:00
|
|
|
"ignoreInternal": true,
|
2021-04-15 18:49:29 +00:00
|
|
|
"tagNamePreference": {
|
|
|
|
"warning": "warning",
|
|
|
|
"note": "note"
|
|
|
|
}
|
|
|
|
}
|
2021-11-17 11:21:38 +00:00
|
|
|
}
|
2021-03-18 14:26:41 +00:00
|
|
|
}
|