generated from unplugin/unplugin-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db343dc
commit fe7aaaf
Showing
5 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
charset = utf-8 | ||
|
||
[*.js] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[{package.json,*.yml,*.cjson}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,52 @@ | ||
{ | ||
"extends": "@antfu" | ||
"extends": [ | ||
"@nuxtjs/eslint-config-typescript", | ||
// Enable typescript-specific recommended rules | ||
"plugin:@typescript-eslint/recommended", | ||
// Turns off all rules that are unnecessary or might conflict with Prettier (needs to be last) | ||
"prettier" | ||
], | ||
"plugins": ["unused-imports"], | ||
"rules": { | ||
// Workaround for bug https://github.com/nuxt/eslint-config/issues/147 | ||
"no-useless-constructor": "off", | ||
"@typescript-eslint/no-useless-constructor": "error", | ||
// Don"t report unused imports (this is handled by prettier) | ||
"unused-imports/no-unused-imports": "off", | ||
// Report unused variables (except the ones prefixed with an underscore) | ||
"unused-imports/no-unused-vars": [ | ||
"warn", | ||
{ | ||
"vars": "all", | ||
"varsIgnorePattern": "^_", | ||
"args": "after-used", | ||
"argsIgnorePattern": "^_" | ||
} | ||
], | ||
// Ensure void operator is not used, except for variable assignment or function return (might be handy for promises) | ||
"no-void": ["error", { "allowAsStatement": true }], | ||
// Demote this to warning as long as we are still using cjs modules | ||
"import/named": "warn", | ||
// Import order is handled by prettier (which is incompatible with this rule: https://github.com/simonhaenisch/prettier-plugin-organize-imports/issues/65) | ||
"import/order": "off" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.vue"], | ||
// Parser supporting vue files | ||
"parser": "vue-eslint-parser", | ||
"parserOptions": { | ||
// Use ts parser for ts files and for the script tag in vue files | ||
"parser": "@typescript-eslint/parser", | ||
// Path to tsconfig to enable rules that require type information | ||
"project": "./tsconfig.eslint.json", | ||
// Correctly handle vue files | ||
"extraFileExtensions": [".vue"] | ||
}, | ||
"extends": [ | ||
// Enable recommended rules for typescript that use typing information (may be CPU intensive) | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"singleAttributePerLine": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
// ensure that nobody can accidentally use this config for a build | ||
"noEmit": true | ||
}, | ||
"include": [ | ||
// whatever paths you intend to lint | ||
"src", | ||
"test" | ||
] | ||
} |