Skip to content

Instantly share code, notes, and snippets.

@hamzahamidi
Created April 1, 2019 10:23
Show Gist options
  • Save hamzahamidi/5bd59c7bee02817835e9a770b4427068 to your computer and use it in GitHub Desktop.
Save hamzahamidi/5bd59c7bee02817835e9a770b4427068 to your computer and use it in GitHub Desktop.
Eslint for react-script 2
{
"extends": ["react-app", "prettier", "prettier/react"],
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true
},
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module",
"ecmaFeatures": { "jsx": true }
},
"plugins": ["prettier", "react"],
"rules": {
"prettier/prettier": "error",
"react/jsx-sort-props": 0,
"react/no-multi-comp": 0,
"react/jsx-filename-extension": [2, { "extensions": [".js"] }],
"linebreak-style": 0,
"import/no-extraneous-dependencies": [
"error",
{ "devDependencies": ["**/*.test.js", "**/*.spec.js", "**/*.stories.js", "**/setupTests.js"] }
]
},
"settings": {
"import/resolver": {
"node": {
"moduleDirectory": ["node_modules", "./src"]
}
}
}
}
{
"jsxBracketSameLine": true,
"semi": true,
"trailingComma": "all",
"singleQuote": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment