-
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.
🆕 chore(.eslintignore): add ignore rules for /dist and /node_modules …
…directories, add .eslintrc.js and babel.config.js files 🆕 chore(.eslintrc.js): add custom eslint rules The .eslintignore file now includes the /dist and /node_modules directories, as well as the .eslintrc.js and babel.config.js files. The .eslintrc.js file now includes custom eslint rules, such as enforcing semicolons, spaces before function parentheses, and curly braces. Additionally, the file includes rules for importing named, namespace, default, and exported modules. 🐛 fix(rollup.config.js): add semicolons to import statements ✨ feat(rollup.config.js): enable terser plugin The import statements in the rollup.config.js file were missing semicolons, which could cause issues in some environments. The terser plugin was also enabled to minify the output code.
- Loading branch information
1 parent
1d3e8e7
commit 6f2cef4
Showing
4 changed files
with
1,495 additions
and
11 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/dist | ||
/node_modules | ||
.eslintrc.js | ||
babel.config.js |
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,60 @@ | ||
module.exports = { | ||
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy | ||
// This option interrupts the configuration hierarchy at this file | ||
// Remove this if you have an higher level ESLint config file (it usually happens into a monorepos) | ||
root: true, | ||
|
||
env: { | ||
browser: true, | ||
'vue/setup-compiler-macros': true | ||
}, | ||
|
||
// Rules order is important, please avoid shuffling them | ||
extends: [ | ||
// Base ESLint recommended rules | ||
'eslint:recommended', | ||
// See https://eslint.vuejs.org/rules/#available-rules | ||
'plugin:vue/vue3-essential', | ||
'standard' | ||
], | ||
|
||
plugins: [ | ||
// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files | ||
// required to lint *.vue files | ||
'vue', | ||
], | ||
|
||
globals: { | ||
terser: 'readonly', | ||
}, | ||
|
||
// add your custom rules here | ||
rules: { | ||
// allow async-await | ||
'generator-star-spacing': 'off', | ||
// allow paren-less arrow functions | ||
'arrow-parens': 'off', | ||
'one-var': 'off', | ||
|
||
'import/first': 'off', | ||
'import/named': 'error', | ||
'import/namespace': 'error', | ||
'import/default': 'error', | ||
'import/export': 'error', | ||
'import/extensions': 'off', | ||
'import/no-unresolved': 'off', | ||
'import/no-extraneous-dependencies': 'off', | ||
'prefer-promise-reject-errors': 'off', | ||
|
||
// custom | ||
'semi': [2, 'always'], | ||
'space-before-function-paren': [2, 'always'], | ||
'keyword-spacing': [2, { before: true, after: true }], | ||
'space-before-blocks': [2, 'always'], | ||
'comma-dangle': [2, 'always-multiline'], | ||
'no-console': 'off', | ||
'no-multi-str': 'off', | ||
'curly': 1, | ||
'vue/multi-word-component-names': 'off' | ||
} | ||
} |
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
Oops, something went wrong.