Skip to content

Commit

Permalink
Merge pull request #115 from panz3r/tooling-upgrade
Browse files Browse the repository at this point in the history
Tooling upgrade
  • Loading branch information
Yuvaleros authored Mar 18, 2020
2 parents 2347b32 + 9479606 commit cfc3ede
Show file tree
Hide file tree
Showing 19 changed files with 8,495 additions and 24,190 deletions.
9 changes: 0 additions & 9 deletions .babelrc

This file was deleted.

46 changes: 46 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
modules: false,
},
],
'@babel/preset-react',
],
plugins: [
'babel-plugin-optimize-clsx',
[
'@babel/plugin-proposal-class-properties',
{
loose: true,
},
],
[
'@babel/plugin-proposal-object-rest-spread',
{
loose: true,
},
],
// any package needs to declare 7.4.4 as a runtime dependency. default is ^7.0.0
[
'@babel/plugin-transform-runtime',
{
version: '^7.4.4',
},
],
// for IE 11 support
'@babel/plugin-transform-object-assign',
// material-ui 'productionPlugins'
'@babel/plugin-transform-react-constant-elements',
'babel-plugin-transform-dev-warning',
[
'babel-plugin-transform-react-remove-prop-types',
{
mode: 'unsafe-wrap',
},
],
// END material-ui 'productionPlugins'
],
ignore: [/@babel[\\|/]runtime/], // Fix a Windows issue.
};
109 changes: 31 additions & 78 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,54 +17,64 @@
"globals": {
"React": true
},
"settings": {
"react": {
"version": "15.0"
}
},
"plugins": [
"babel",
"react"
],
"extends": [
"eslint:recommended"
"eslint:recommended",
"plugin:react/recommended"
],
"rules": {
"array-bracket-spacing": ["error", "never"],
"arrow-spacing": "error",
"arrow-parens": "error",
"arrow-spacing": "error",
"brace-style": "error",
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": ["error", {"before": false, "after": true}],
"comma-style": ["error", "last"],
"computed-property-spacing": ["error", "never"],
"consistent-this": ["error", "self"],
"consistent-return": "off",
"dot-notation": "error",
"consistent-this": ["error", "self"],
"dot-location": ["error", "property"],
"eqeqeq": ["error", "smart"],
"dot-notation": "error",
"eol-last": "error",
"indent": ["error", 4, {"SwitchCase": 1}],
"eqeqeq": ["error", "smart"],
"generator-star-spacing": "error",
"id-blacklist": ["error", "e"],
"indent": ["error", 4, {"SwitchCase": 1}],
"jsx-quotes": ["error", "prefer-double"],
"keyword-spacing": "error",
"key-spacing": "error",
"keyword-spacing": "error",
"max-len": ["error", 120, 4],
"new-cap": ["off", {"capIsNew": true, "newIsCap": true}],
"no-unused-expressions": "error",
"no-unused-vars": "error",
"no-shadow": "off",
"no-spaced-func": "error",
"no-multiple-empty-lines": "error",
"no-multi-spaces": "error",
"no-undef": "error",
"no-empty-pattern": "error",
"no-dupe-keys": "error",
"no-await-in-loop": "error",
"no-case-declarations": "off",
"no-cond-assign": "error",
"no-dupe-args": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-cond-assign": "error",
"no-extra-semi": "error",
"no-empty-pattern": "error",
"no-extra-boolean-cast": "error",
"no-extra-semi": "error",
"no-multi-spaces": "error",
"no-multiple-empty-lines": "error",
"no-shadow": "off",
"no-spaced-func": "error",
"no-trailing-spaces": "error",
"no-undef": "error",
"no-underscore-dangle": "error",
"no-unneeded-ternary": "error",
"no-unreachable": "error",
"no-unused-expressions": "error",
"no-unused-vars": "error",
"no-var": "error",
"object-curly-spacing": ["error", "never"],
"one-var": ["error", "never"],
"operator-linebreak": ["error", "after"],
"padded-blocks": ["error", "never"],
Expand All @@ -77,66 +87,9 @@
"space-infix-ops": "error",
"space-unary-ops": ["error", {"words": true, "nonwords": false}],
"spaced-comment": "error",
"yoda": "error",
"babel/object-curly-spacing": ["error", "never"],
"babel/generator-star-spacing": "error",
"babel/array-bracket-spacing": "error",
"babel/arrow-parens": "error",
"babel/no-await-in-loop": "error",
"babel/func-params-comma-dangle": "error",
"babel/flow-object-type": "error",
"react/display-name": "error",
"react/jsx-boolean-value": ["error", "always"],
"react/jsx-closing-bracket-location": "error",
"react/jsx-curly-spacing": "error",
"react/jsx-equals-spacing": "error",
"react/jsx-filename-extension": ["error", {"extensions": [".js"]}],
"react/jsx-first-prop-new-line": ["error", "multiline"],
"react/jsx-handler-names": "error",
"react/jsx-indent": ["error", 4],
"react/jsx-indent-props": ["error", 4],
"react/jsx-max-props-per-line": ["error", {"maximum": 3}],
"react/jsx-no-comment-textnodes": "error",
"react/jsx-no-duplicate-props": "error",
"react/jsx-no-undef": "error",
"react/jsx-pascal-case": "error",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/jsx-wrap-multilines": "error",
"react/no-danger": "error",
"react/no-deprecated": "error",
"react/no-did-mount-set-state": "error",
"react/no-did-update-set-state": "error",
"react/no-direct-mutation-state": "error",
"react/no-multi-comp": "off",
"react/no-render-return-value": "error",
"react/no-is-mounted": "error",
"react/no-unknown-property": "error",
"react/prefer-arrow-callback": "off",
"react/prefer-es6-class": "error",
"react/react-in-jsx-scope": "error",
"react/require-render-return": "error",
"react/self-closing-comp": "error",
"react/sort-comp": "error",
"react/no-string-refs": "warn",

"react/prop-types": "off",
"prefer-template": "off",
"react/sort-prop-types": "off",
"react/jsx-space-before-closing": "off",
"strict": "off",
"react/require-extension": "off",
"no-case-declarations": "off",
"react/jsx-key": "off",
"react/jsx-no-bind": "off",
"react/jsx-no-literals": "off",
"react/jsx-no-target-blank": "off",
"react/jsx-sort-props": "off",
"react/no-set-state": "off",
"react/forbid-prop-types": "off",
"react/prefer-stateless-function": "off",
"react/require-optimization": "off",
"babel/object-shorthand": "off",
"babel/new-cap": "off"
"yoda": "error",
"babel/new-cap": "off",
"babel/object-shorthand": "off"
}
}
21 changes: 21 additions & 0 deletions .size-snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"dist/index.js": {
"bundled": 29806,
"minified": 18686,
"gzipped": 4876
},
"dist/index.es.js": {
"bundled": 28544,
"minified": 17636,
"gzipped": 4770,
"treeshaked": {
"rollup": {
"code": 13846,
"import_statements": 1544
},
"webpack": {
"code": 16388
}
}
}
}
Loading

0 comments on commit cfc3ede

Please sign in to comment.