Skip to content

Commit

Permalink
Use prettier for code styling (Hacker0x01#1189)
Browse files Browse the repository at this point in the history
* Add prettier instead of ESlint

* Remove last references

* Lint all files

* Bring back parts of ESlint

* Some more changes

* Add back disabled lint
  • Loading branch information
martijnrusschen authored Dec 28, 2017
1 parent 1306eb2 commit cef6ab5
Show file tree
Hide file tree
Showing 91 changed files with 65,981 additions and 50,369 deletions.
56 changes: 34 additions & 22 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,41 @@
var NODE_ENV = process.env.NODE_ENV
var MODULES = process.env.MODULES
var NODE_ENV = process.env.NODE_ENV;
var MODULES = process.env.MODULES;

var modules = MODULES === 'false' || NODE_ENV === 'test' ? 'commonjs' : false
var modules = MODULES === 'false' || NODE_ENV === 'test' ? 'commonjs' : false;

var config = {
presets: [['env', {
loose: true,
modules: modules,
forceAllTransforms: NODE_ENV === 'production'
}], 'stage-0', 'react'],
plugins: []
}
presets: [
[
'env',
{
loose: true,
modules: modules,
forceAllTransforms: NODE_ENV === 'production',
},
],
'stage-0',
'react',
],
plugins: [],
};

if (NODE_ENV === 'development') {
config.plugins = config.plugins.concat([
'transform-class-properties',
['react-transform', {
transforms: [{
transform: 'react-transform-hmr',
imports: ['react'],
locals: ['module']
}]
}],
'add-react-displayname'
])
config.plugins = config.plugins.concat([
'transform-class-properties',
[
'react-transform',
{
transforms: [
{
transform: 'react-transform-hmr',
imports: ['react'],
locals: ['module'],
},
],
},
],
'add-react-displayname',
]);
}

module.exports = config
module.exports = config;
10 changes: 0 additions & 10 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
"react"
],

"extends": "standard",

"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
Expand All @@ -21,20 +19,13 @@
"parser": "babel-eslint",

"rules": {
"jsx-quotes": [2, "prefer-double"],
"no-irregular-whitespace": 0,
"react/display-name": 2,
"react/forbid-prop-types": 0,
"react/jsx-boolean-value": 2,
"react/jsx-closing-bracket-location": [2, 'after-props'],
"react/jsx-curly-spacing": [2, "never"],
"react/jsx-indent-props": [2, 2],
"react/jsx-key": 2,
"react/jsx-max-props-per-line": [2, { "maximum": 4 }],
"react/jsx-no-duplicate-props": 2,
"react/jsx-no-literals": 0,
"react/jsx-no-undef": 2,
"react/jsx-pascal-case": 2,
"react/jsx-sort-props": 0,
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
Expand All @@ -52,6 +43,5 @@
"react/react-in-jsx-scope": 2,
"react/self-closing-comp": 2,
"react/sort-comp": 2,
"react/wrap-multilines": 0
}
}
Loading

0 comments on commit cef6ab5

Please sign in to comment.