Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rules as mentioned in issues #25

Merged
merged 3 commits into from
Aug 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions index.js
Expand Up @@ -46,11 +46,8 @@ module.exports = {
'newlines-between': 'never'
}
],
'no-console': [ERROR, {allow: ['warn', 'error']}],
'no-lonely-if': ERROR,
'no-throw-literal': ERROR,
'no-var': ERROR,
'no-unneeded-ternary': ERROR,
'no-unused-expressions': ERROR,
'no-restricted-syntax': [
ERROR,
{
Expand All @@ -65,6 +62,11 @@ module.exports = {
}
],
'no-shadow': ERROR,
'no-throw-literal': ERROR,
'no-unneeded-ternary': ERROR,
'no-unused-expressions': ERROR,
'no-use-before-define': [ERROR, {functions: false}],
'no-var': ERROR,
'object-shorthand': ERROR,
'prefer-arrow-callback': ERROR,
'prefer-const': ERROR,
Expand Down
5 changes: 3 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "eslint-config-molindo",
"version": "3.0.0",
"version": "4.0.0",
"description": "Molindo ESLint config that implements our styleguide and helps to catch errors.",
"main": "index.js",
"repository": "https://github.com/molindo/eslint-config-molindo",
Expand Down Expand Up @@ -30,12 +30,13 @@
},
"peerDependencies": {
"babel-eslint": "^10.0.0",
"eslint": "^5.12.0",
"eslint": "^5.12.0 || ^6.0.0",
"eslint-plugin-css-modules": "^2.11.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.12.3",
"eslint-plugin-react-hooks": "^1.6.1",
"prettier": "^1.15.3"
}
}
13 changes: 10 additions & 3 deletions react.js
Expand Up @@ -8,7 +8,11 @@ module.exports = Object.assign({}, base, {
plugins: base.plugins.concat('css-modules', 'jsx-a11y', 'react'),

settings: Object.assign({}, base.settings, {
'import/resolver': 'webpack'
'import/resolver': {
node: {
paths: ['node_modules', 'src']
}
}
}),

extends: (base.extends || []).concat(
Expand Down Expand Up @@ -39,6 +43,7 @@ module.exports = Object.assign({}, base, {
}
],
'react/jsx-no-bind': [ERROR, {allowArrowFunctions: true}],
'react/jsx-no-target-blank': ERROR,
'react/jsx-sort-props': [
ERROR,
{
Expand All @@ -48,9 +53,10 @@ module.exports = Object.assign({}, base, {
],
'react/no-access-state-in-setstate': ERROR,
'react/no-direct-mutation-state': ERROR,
'react/no-this-in-sfc': ERROR,
'react/no-typos': ERROR,
'react/no-unused-prop-types': ERROR,
'react/no-unused-state': ERROR,
'react/no-typos': ERROR,
'react/sort-comp': [
ERROR,
{
Expand All @@ -66,7 +72,8 @@ module.exports = Object.assign({}, base, {
'render'
]
}
]
],
'react/sort-prop-types': ERROR
}),

overrides: (base.overrides || []).concat({
Expand Down