Created
October 13, 2019 13:54
-
-
Save vincedgy/707c5d38e7c9ac6429b29bbe8f27c5eb to your computer and use it in GitHub Desktop.
eslinter Config file for React dev
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"env": { | |
"browser": true, | |
"es6": true | |
}, | |
"extends": [ | |
"eslint:recommended", | |
"plugin:react/recommended" | |
], | |
"globals": { | |
"Atomics": "readonly", | |
"SharedArrayBuffer": "readonly" | |
}, | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { | |
"ecmaVersion": 7, | |
"sourceType": "module", | |
"ecmaFeatures": { | |
"modules": true, | |
"jsx": true | |
} | |
}, | |
"plugins": [ | |
"react", | |
"@typescript-eslint", | |
"mocha" | |
], | |
"rules": { | |
"no-unused-vars": "warn", | |
"@typescript-eslint/no-unused-vars": "error" | |
}, | |
"settings": { | |
"react": { | |
"createClass": "createReactClass", // Regex for Component Factory to use, | |
// default to "createReactClass" | |
"pragma": "React", // Pragma to use, default to "React" | |
"version": "detect", // React version. "detect" automatically picks the version you have installed. | |
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value. | |
// default to latest and warns if missing | |
// It will default to "detect" in the future | |
"flowVersion": "0.53" // Flow version | |
}, | |
"propWrapperFunctions": [ | |
// The names of any function used to wrap propTypes, e.g. `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped. | |
"forbidExtraProps", | |
{"property": "freeze", "object": "Object"}, | |
{"property": "myFavoriteWrapper"} | |
], | |
"linkComponents": [ | |
// Components used as alternatives to <a> for linking, eg. <Link to={ url } /> | |
"Hyperlink", | |
{"name": "Link", "linkAttribute": "to"} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment