@
@
@Richswitch2018-07-19 10:36:45
JavaScript
@Richswitch, 2018-07-19 10:36:45

Why won't eslint watch my files?

Hey!
I can't figure out why eslint won't lock my files after installation according to the guide on the off site (eslint --init). In general, I want eslint to point out my mistakes when I use:
- React;
- proptypes;
- Redux;
- Styled-components (well, if there is a rule for this, why not);
I naturally compile with webpack
Of course, I only need eslint for the Develompent
package.json mode

"eslint": "^4.19.1",
    "eslint-plugin-react": "^7.10.0",

eslintrc.json config which is generated automatically after "eslint --init"
{
    "env": {
        "browser": true,
        "commonjs": true,
        "es6": true
    },
    "extends": "eslint:recommended",
    "parserOptions": {
        "ecmaFeatures": {
            "experimentalObjectRestSpread": true,
            "jsx": true
        },
        "sourceType": "module"
    },
    "plugins": [
        "react"
    ],
    "rules": {
        "indent": [
            "error",
            "tab"
        ],
        "linebreak-style": [
            "error",
            "unix"
        ],
        "quotes": [
            "error",
            "single"
        ],
        "semi": [
            "error",
            "always"
        ]
    }
}

This way I can lint through the console. But I want the check to happen when I write the code. For past projects, the linter worked correctly for me, but then I used the rollup and airbnb presets, then there were no problems.
Do you really need a separate loader for linter and other crap?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FUNNYDMAN, 2018-07-19
@FUNNYDMAN

The problem is solved by installing the necessary plugins for your IDE.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question