-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor js rules in order to make them reusable
- Loading branch information
Showing
7 changed files
with
46 additions
and
113 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,7 @@ | ||
const jsRules = require('./rules'); | ||
|
||
module.exports = { | ||
extends: ['airbnb', 'plugin:import/errors', 'plugin:import/warnings'], | ||
extends: ['airbnb-base', 'plugin:import/errors', 'plugin:import/warnings'], | ||
parser: 'babel-eslint', | ||
rules: { | ||
'no-underscore-dangle': ['off'], | ||
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }], | ||
'import/prefer-default-export': ['off'], | ||
'import/order': [ | ||
'error', | ||
{ | ||
groups: [ | ||
'builtin', | ||
'external', | ||
'internal', | ||
'parent', | ||
'sibling', | ||
'index' | ||
] | ||
} | ||
] | ||
} | ||
rules: jsRules | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Plain JS-projects uses airbnb-base and React-projects uses airbnb. | ||
* | ||
* To avoid duplicating these rules they are imported from here. | ||
*/ | ||
|
||
module.exports = { | ||
'no-underscore-dangle': ['off'], | ||
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }], | ||
'import/prefer-default-export': ['off'], | ||
'import/order': [ | ||
'error', | ||
{ | ||
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'] | ||
} | ||
] | ||
}; |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
extends: ['../javascript', '../react', '../flowtype', '../prettier'].map( | ||
require.resolve | ||
) | ||
}; |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|