1 umiJs 的eslint報(bào)錯(cuò)
Expected linebreaks to be 'LF' but found 'CRLF'.eslint(linebreak-style)
修改eslinttrc.js
新增
"linebreak-style": ["off", "windows"],
rules:{
"linebreak-style": ["off", "windows"],
}
注釋vue-cli的eslint
修改.eslintrc.js
注釋掉
// '@vue/standard',//這行注釋就可以
module.exports = {
root: true,
env: {
browser: true,
node: true,
es6: true
},
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module'
},
plugins: [
'vue'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'space-before-function-paren': [2, 'never'],
'vue/array-bracket-spacing': 'error',
'vue/arrow-spacing': 'error',
'vue/block-spacing': 'error',
'vue/brace-style': 'error',
'vue/camelcase': 'error',
'vue/comma-dangle': 'error',
'vue/component-name-in-template-casing': 'error',
'vue/eqeqeq': 'error',
'vue/key-spacing': 'error',
'vue/match-component-file-name': 'error',
'vue/object-curly-spacing': 'error',
"vue/html-closing-bracket-newline": "off",
"vue/max-attributes-per-line":"off",
"vue/html-self-closing":"off",
"vue/strictNullChecks":"off",
"vue/singleline-html-element-content-newline":"off"
},
'extends': [
'eslint:recommended',
'plugin:vue/recommended',
//'@vue/standard', //注釋掉
'@vue/typescript'
]
}