I'm using the Atom Code Editor for a VueJS Project with ESLINT (feross). By trying to quickly prototype a layout I get these errors.
Missing space before opening brace
Strings must use singlequote
Extra semicolon
During the prototype phase I would like ESLINT/ATOM to disable/ignore these errors and render the site anyways. How to do that?
You could temporarily turn off eslint. In my setup, inspecting build/webpack.base.conf.js
shows the following snippet:
module: {
rules: [
...(config.dev.useEslint ? [createLintingRule()] : []),
{
test: /\.vue$/,
The linting rule will enable eslint. Lets avoid that and set config.dev.useEslint
to false
. Go to config/index.js
and alter the following snippet:
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: false,
In your .eslintrc
file, do the following:
"rules": {
"space-before-blocks": "off",
"quotes": "off",
"no-extra-semi": "off"
}
This will turn off the above rules. I would suggest instead of turning it off let it throw warning, so in future you remember to fix these issues.
ESLint has an awesome documentation: https://eslint.org/docs/rules/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With