Created
April 13, 2024 07:53
-
-
Save wys1203/81c90e3de544eee562066beb4785469b to your computer and use it in GitHub Desktop.
nuxtjs3 configs
This file contains hidden or 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
| module.exports = { | |
| root: true, | |
| env: { | |
| browser: true, | |
| node: true | |
| }, | |
| parserOptions: { | |
| parser: '@typescript-eslint/parser', | |
| sourceType: 'module' | |
| }, | |
| extends: [ | |
| '@nuxtjs', | |
| 'plugin:nuxt/recommended', | |
| '@nuxtjs/eslint-config-typescript' | |
| ], | |
| plugins: [ | |
| '@typescript-eslint' | |
| ], | |
| // 自定義ESLint規則 | |
| rules: { | |
| 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | |
| 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | |
| 'vue/singleline-html-element-content-newline': 'off', | |
| 'vue/multiline-html-element-content-newline': 'off', | |
| 'vue/html-self-closing': 'off', | |
| '@typescript-eslint/no-unused-vars': 'warn', | |
| 'nuxt/no-cjs-in-config': 'off' | |
| } | |
| }; |
This file contains hidden or 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
| { | |
| "semi": false, | |
| "singleQuote": true, | |
| "arrowParens": "avoid", | |
| "trailingComma": "none", | |
| "bracketSpacing": true, | |
| "htmlWhitespaceSensitivity": "css", | |
| "printWidth": 80, | |
| "tabWidth": 2 | |
| } |
This file contains hidden or 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
| { | |
| "editor.formatOnSave": true, | |
| "editor.codeActionsOnSave": { | |
| "source.fixAll.eslint": "always" | |
| }, | |
| "eslint.validate": [ | |
| "javascript", | |
| "javascriptreact", | |
| "typescript", | |
| "typescriptreact", | |
| "vue" | |
| ], | |
| "[javascript]": { | |
| "editor.formatOnSave": false | |
| }, | |
| "[vue]": { | |
| "editor.formatOnSave": true | |
| }, | |
| "[typescript]": { | |
| "editor.formatOnSave": true | |
| }, | |
| "editor.tabSize": 2 // 設置縮進大小為2個空格 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment