forked from deriv-com/deriv-app
-
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.
Merge pull request #2 from MahboobehMohammadi/webpack-config
Refactoring_2
- Loading branch information
Aaron
committed
May 29, 2019
1 parent
b43802a
commit 890fe21
Showing
16 changed files
with
355 additions
and
228 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,39 +1,13 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-react", | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"browsers": [ | ||
"last 2 versions", | ||
"ios_saf >= 8", | ||
"not IE <= 10", | ||
"chrome >= 49", | ||
"firefox >= 49", | ||
"> 1%" | ||
] | ||
}, | ||
"loose": true, | ||
"useBuiltIns": "usage", | ||
"corejs": "2.6.5", | ||
} | ||
] | ||
], | ||
"plugins": [ | ||
[ | ||
"@babel/plugin-proposal-object-rest-spread", | ||
{ | ||
"useBuiltIns": "usage", | ||
"corejs": "2.6.5", | ||
} | ||
], | ||
[ | ||
"@babel/plugin-proposal-class-properties", | ||
{ | ||
"useBuiltIns": "usage", | ||
"corejs": "2.6.5", | ||
} | ||
] | ||
] | ||
} | ||
"presets": [ | ||
["@babel/preset-env", { | ||
"modules": false | ||
}], | ||
"@babel/preset-react" | ||
], | ||
"plugins": [ | ||
["@babel/plugin-proposal-decorators", { "legacy": true }], | ||
["@babel/plugin-syntax-dynamic-import"], | ||
["@babel/plugin-proposal-class-properties", { "loose" : true }], | ||
] | ||
} |
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,76 @@ | ||
module.exports = { | ||
parser: 'babel-eslint', | ||
env: { | ||
es6 : true, | ||
browser: true, | ||
amd : true, | ||
jquery : true, | ||
mocha : true, | ||
}, | ||
globals: { | ||
Blockly: false, | ||
trackJs: false, | ||
jest: false, | ||
dataLayer: false | ||
}, | ||
rules: { | ||
camelcase : 0, | ||
semi : ['error', 'always'], | ||
'array-callback-return' : 0, | ||
'brace-style' : ['error', '1tbs', { allowSingleLine: true }], | ||
'eol-last' : ['error', 'always'], | ||
'func-names' : ['error', 'never'], | ||
'keyword-spacing' : ['error', { after: true , before: true }], | ||
'lines-between-class-members' : ['error', 'always', { exceptAfterSingleLine: true }], | ||
'no-extra-semi' : 'error', | ||
'no-console' : 'error', | ||
'no-else-return' : ['error', { allowElseIf: true }], | ||
'no-multi-assign' : 0, | ||
'no-param-reassign' : ['error', { props: false }], | ||
'no-restricted-globals' : 0, | ||
'no-script-url' : 0, | ||
'no-trailing-spaces' : ['error', { skipBlankLines: true }], | ||
'object-curly-spacing' : ['error', 'always', { arraysInObjects: true, objectsInObjects: true }], | ||
'one-var' : ['error', { initialized: 'never', uninitialized: 'always' }], | ||
'prefer-destructuring' : 0, | ||
'space-in-parens' : ['error', 'never'], | ||
'space-infix-ops' : 'error', | ||
'space-unary-ops' : 'error', | ||
'no-multiple-empty-lines' : ['error', { 'max': 1, 'maxEOF': 1 }], | ||
|
||
// import rules | ||
'import/no-extraneous-dependencies' : [0, { extensions: ['.jsx'] }], | ||
'import/no-useless-path-segments' : 'error', | ||
'import/order' : ['error', { groups: [['builtin', 'external'], 'internal', 'sibling', 'parent'], 'newlines-between': 'ignore' }], | ||
'import/prefer-default-export' : 0, | ||
|
||
// react rules | ||
'jsx-quotes' : ['error', 'prefer-single'], | ||
'react/jsx-closing-bracket-location': ['error', { selfClosing: 'line-aligned', nonEmpty: 'line-aligned' }], | ||
'react/jsx-closing-tag-location' : 'error', | ||
'react/jsx-first-prop-new-line' : ['error', 'multiline-multiprop'], | ||
'react/jsx-indent' : ['error', 4], | ||
'react/jsx-indent-props' : ['error', 4], | ||
'react/jsx-max-props-per-line' : ['error', { when: 'multiline' }], | ||
'react/jsx-tag-spacing' : ['error', { closingSlash: 'never', beforeSelfClosing: 'always' }], | ||
'react/prop-types' : 0, | ||
'react/self-closing-comp' : 'error', | ||
'react/sort-prop-types' : ['error', { ignoreCase: true, sortShapeProp: true }], | ||
}, | ||
extends: [ | ||
'airbnb-base', | ||
'binary', | ||
'plugin:react/recommended', | ||
], | ||
parserOptions: { | ||
ecmaVersion : 6, | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
'webpack': { 'config': 'webpack.config.js' } | ||
} | ||
}, | ||
}; |