Skip to content

Commit

Permalink
Merge pull request #25 from molindo/add-more-rules
Browse files Browse the repository at this point in the history
Add rules as mentioned in issues
  • Loading branch information
amannn authored Aug 2, 2019
2 parents 550be0d + 4955320 commit c352bbd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
10 changes: 6 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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

0 comments on commit c352bbd

Please sign in to comment.