1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00

update typescript/eslint conf

This commit is contained in:
Kevin Levron 2021-04-15 17:50:41 +02:00
parent 6c5afa39b9
commit 6bbb80710d
3 changed files with 30 additions and 14 deletions

View File

@ -1,22 +1,28 @@
/* eslint-disable quote-props */
module.exports = { module.exports = {
root: true,
env: { env: {
browser: true, browser: true,
es2020: true, es2020: true,
node: true,
}, },
extends: [ extends: [
'plugin:vue/essential', 'plugin:vue/essential',
'@vue/standard',
'@vue/typescript/recommended',
'standard', 'standard',
], ],
parser: 'vue-eslint-parser',
parserOptions: { parserOptions: {
ecmaVersion: 12, parser: '@typescript-eslint/parser',
sourceType: 'module',
}, },
plugins: [ // parserOptions: {
'vue', // ecmaVersion: 2020,
], // },
rules: { rules: {
'semi': [2, 'always'], 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'semi': ['error', 'never'],
'space-before-function-paren': 'off', 'space-before-function-paren': 'off',
'one-var': 'off', 'one-var': 'off',
'quotes': 'off', 'quotes': 'off',
@ -36,5 +42,12 @@ module.exports = {
'object-property-newline': 'off', 'object-property-newline': 'off',
'eqeqeq': 'warn', 'eqeqeq': 'warn',
'no-multiple-empty-lines': 'off', 'no-multiple-empty-lines': 'off',
'@typescript-eslint/ban-ts-comment': 'warn',
// '@typescript-eslint/ban-ts-comment': ['warn', {
// 'ts-ignore': 'allow-with-description',
// }],
// 'vue/valid-template-root': 'off',
'vue/no-multiple-template-root': 'off',
}, },
}; }

View File

@ -10,17 +10,19 @@
"@rollup/plugin-buble": "^0.21.3", "@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-replace": "^2.3.3", "@rollup/plugin-replace": "^2.3.3",
"@types/three": "^0.127.1", "@types/three": "^0.127.1",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"@vitejs/plugin-vue": "^1.2.1", "@vitejs/plugin-vue": "^1.2.1",
"@vue/compiler-sfc": "^3.0.11", "@vue/compiler-sfc": "^3.0.11",
"@vue/eslint-config-standard": "^5.1.2",
"@vue/eslint-config-typescript": "^7.0.0",
"cannon": "^0.6.2", "cannon": "^0.6.2",
"eslint": "^7.7.0", "eslint": "^7.7.0",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.22.0", "eslint-plugin-import": "^2.22.0",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1", "eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1", "eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^7.9.0",
"gsap": "^3.5.1", "gsap": "^3.5.1",
"rollup-plugin-terser": "^7.0.2", "rollup-plugin-terser": "^7.0.2",
"rollup-plugin-vue": "^6.0.0-beta.11", "rollup-plugin-vue": "^6.0.0-beta.11",
@ -29,7 +31,8 @@
"typescript": "^4.1.3", "typescript": "^4.1.3",
"vite": "^2.1.5", "vite": "^2.1.5",
"vue": "^3.0.11", "vue": "^3.0.11",
"vue-tsc": "^0.0.15" "vue-eslint-parser": "^7.6.0",
"vue-tsc": "^0.0.24"
}, },
"main": "build/trois.js", "main": "build/trois.js",
"module": "build/trois.module.js", "module": "build/trois.module.js",

View File

@ -4,8 +4,8 @@
"module": "esnext", "module": "esnext",
// this enables stricter inference for data properties on `this` // this enables stricter inference for data properties on `this`
"strict": true, "strict": true,
"jsx": "preserve",
"moduleResolution": "node", "moduleResolution": "node",
}, },
"include": ["src"] "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"exclude": [ "node_modules" ]
} }