Skip to content

Commit

Permalink
feat(eslint-config-vue): 0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
NexZhu committed May 25, 2021
1 parent 339d8ef commit 8ef0eff
Show file tree
Hide file tree
Showing 8 changed files with 3,273 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ Add the `extends` filed in your ESLint config file:

Omit `/xxx` for general JavaScript projects or replace `xxx` with one of `browser`, `typescript` or `bowser-typescript`, see [Provided ESLint configs](#provided-eslint-configs).

For Vue project, use:

```json
{
"extends": "@daotl/eslint-config-vue[/typescript]"
}
```

## References

- [Prettier - Sharing configurations](https://prettier.io/docs/en/configuration.html#sharing-configurations)
Expand Down
6 changes: 6 additions & 0 deletions eslint-config-vue/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
extends: ['@daotl/eslint-config'],
env: {
node: true,
},
}
15 changes: 15 additions & 0 deletions eslint-config-vue/base.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
extends: ['@daotl/eslint-config/browser-base', 'plugin:vue/vue3-recommended'],
env: {
node: true,
},
parser: 'vue-eslint-parser',
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
extraFileExtensions: ['.vue'],
},
}
3 changes: 3 additions & 0 deletions eslint-config-vue/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['./base', 'plugin:prettier/recommended'],
}
Loading

0 comments on commit 8ef0eff

Please sign in to comment.