How to exclude modules from React eslint?

{
 "extends": [ "eslint-config-lifograph"],

 "globals": {
 "React": true
},

 "parser": "babel-eslint",

 "parserOptions": {
 "ecmaFeatures": {
 "jsx": true,
 "modules": true
}
},
 "env": {
 "es6": true
 "browser": true,
 "node": true
},
 "rules": {
 "spaced-comment": 0,
 "semi": 0,
 "quote-props": 0,
 "semi-spacing": 1,
 "yoda": 1,
 "max-len": 1,
 "no-shadow": 1,
 "one-var": 1,
 "no-unused-vars": [1, {"ignore": ["React", "Modal"]}],
 "key-spacing": 1,
 "space-infix-ops": 1,
 "brace-style": 1,
 "no-undef": 1,
 "no-param-reassign": 1,
 "no-lonely-if": 1,
 "wrap-iife": 1,
 "curly": 1,
 "no-multi-spaces": 1,
 "no-mixed-spaces-and-tabs": 1,
 "no-extra-semi": 1,
 "no-floating-decimal": 1,
 "no-sequences": 1,
 "no-unused-expressions": 1,
 "new-parens": 1,
 "no-unreachable": 1,
 "no-extra-boolean-cast": 1,
 "operator-assignment": 1,
 "guard-for-in": 1,
 "eol-last": 0,
 "space-before-blocks": 0,
 "space-before-function-paren": 0,
 "eqeqeq": 0,
 "no-spaced-func": 0,
 "no-return-assign": 1,

 "react/display-name": 0,
 "react/jsx-boolean-value": 1,
 "react/jsx-no-undef": 1,
 "react/jsx-quotes": 1,
 "react/jsx-sort-prop-types": 1,
 "react/jsx-sort-props": 0,
 "react/jsx-uses-react": 1,
 "react/jsx-uses-vars": 1,
 "react/no-did-mount-set-state": 0,
 "react/no-did-update-set-state": 0,
 "react/no-multi-comp": 0,
 "react/no-unknown-property": 1,
 "react/prop-types": 0,
 "react/react-in-jsx-scope": 1,
 "react/self-closing-comp": 1,
 "react/sort-comp": 1,
 "react/wrap-multilines": 1
},
 "plugins": [ "react" ]
}


That did not work, still returns a warning like this

22:33 warning 'profileState' is defined but never used no-unused-vars
July 9th 19 at 10:52
4 answers
July 9th 19 at 10:54
Solution
Just in case, throw off your config.

{
 "extends": "eslint:recommended",
 "parser": "babel-eslint",
 "env": {
 "browser": true,
 "node": true,
 "mocha": true
},
 "plugins": [
"react"
],
 "rules": {
 "no-debugger": 0,
 "no-console": 0,
 "no-case-declarations": 0,
 "new-cap": 0,
 "strict": 0,
 "no-underscore-dangle": 0,
 "no-use-before-define": 0,
 "eol-last": 0,
 "quotes": [2, "single"],
 "comma-dangle": [1, "always-multiline"],
 "jsx-quotes": [1, "prefer-single"],
 "react/jsx-no-undef": 2,
 "react/jsx-uses-react": 1,
 "react/jsx-uses-vars": 1
}
}
"react/jsx-no-undef": 2,
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1

Also found this solution - Audrey.Bergstrom commented on July 9th 19 at 10:57
July 9th 19 at 10:56
just don't lincity library, and give him only your code
This is my code and used profileState - Audrey.Bergstrom commented on July 9th 19 at 10:59
July 9th 19 at 10:58
like config, alternatively you can make a separate folder in the config to enable eslint ignore
July 9th 19 at 11:00
create a file .eslintignore and prescribe the path to the folder containing the code that don't want lincity

Find more questions by tags React