-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vue): reviewed and enabled a set of non-default rules
Extracted separate shared eslint configs for vue projects, because they use separate rulesets for vue2 and vue3.
- Loading branch information
1 parent
6b40989
commit ab92b23
Showing
7 changed files
with
179 additions
and
91 deletions.
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
module.exports = { | ||
extends: './cfg/eslint.config.js', | ||
root: true, | ||
extends: ['./cfg/eslint.config.js', './cfg/eslint-vue3.config.js'], | ||
rules: {}, | ||
} |
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
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,31 @@ | ||
/** | ||
* @naturalcycles/dev-lib/cfg/eslint-vue2.config.js | ||
*/ | ||
|
||
module.exports = { | ||
overrides: [ | ||
{ | ||
files: ['*.vue'], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended-type-checked', | ||
'plugin:@typescript-eslint/stylistic-type-checked', | ||
'plugin:unicorn/recommended', | ||
'plugin:vue/recommended', | ||
'./eslint-rules.js', | ||
'prettier', // must go last | ||
], | ||
env: { | ||
browser: true, | ||
}, | ||
parser: 'vue-eslint-parser', | ||
parserOptions: { | ||
parser: '@typescript-eslint/parser', | ||
project: ['tsconfig.json'], | ||
sourceType: 'module', | ||
ecmaVersion: 'latest', | ||
extraFileExtensions: ['.vue'], | ||
}, | ||
}, | ||
], | ||
} |
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,31 @@ | ||
/** | ||
* @naturalcycles/dev-lib/cfg/eslint-vue3.config.js | ||
*/ | ||
|
||
module.exports = { | ||
overrides: [ | ||
{ | ||
files: ['*.vue'], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended-type-checked', | ||
'plugin:@typescript-eslint/stylistic-type-checked', | ||
'plugin:unicorn/recommended', | ||
'plugin:vue/vue3-recommended', | ||
'./eslint-rules.js', | ||
'prettier', // must go last | ||
], | ||
env: { | ||
browser: true, | ||
}, | ||
parser: 'vue-eslint-parser', | ||
parserOptions: { | ||
parser: '@typescript-eslint/parser', | ||
project: ['tsconfig.json'], | ||
sourceType: 'module', | ||
ecmaVersion: 'latest', | ||
extraFileExtensions: ['.vue'], | ||
}, | ||
}, | ||
], | ||
} |
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
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,6 +1,7 @@ | ||
<script> | ||
<script setup> | ||
const _a = [] | ||
</script> | ||
|
||
<template> | ||
<div></div> | ||
</template> |
Oops, something went wrong.