Many VueJS based projects came up with weird dictatorship-like ESLint configurations, that even break compilation if one has placed a semicolon at End of line or did not typed a space after "if"-statement (which is not an error for Javascript and can be executed this way since 5th Dec 1995).
How can we configure ESlint that it will only show those "accidents" when a Linter is executed but still allows it to get compiled for NodeJS and execute code for testing purposes?
This is one of the eslint-configuration that a lot of projects came up with:
module.exports = {
root: true,
env: {
node: true
},
extends: [
'plugin:vue/vue3-essential',
'@vue/standard',
'@vue/typescript/recommended'
],
parserOptions: {
ecmaVersion: 2020
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'camelcase': 'off'
}
}
Typing a simple line of Code using all these language specific things that I have learned for JS/TS 15-25 years ago will then stop the compilation like this:
8:33 error Extra semicolon semi
13:20 error Extra semicolon semi
15:3 error Expected space(s) after "if" keyword-spacing
16:11 error Strings must use singlequote quotes
19:3 error 'provider' is never reassigned. Use 'const' instead prefer-const
I'd like rather to have just a linter that forces me to write code in the new required style before I commit into the repository, but before that I'd like to be able to at least run the code even if the Linting-fans are not happy with not-having a space after if
or when I still finish code lines with a semicolon as I was doing in several c-style languages like JS over 3 decades now (which is even not an error in terms of Language specific rules)
Is there any configuration that could help here to speed things up and not spending so much time for linting?