Commit 672cf49e authored by Patrik Meijer's avatar Patrik Meijer
Browse files

Add eslint with friends

parent 2358e4a2
Loading
Loading
Loading
Loading

.babelrc

deleted100644 → 0
+0 −9
Original line number Diff line number Diff line
{
  "presets": [
    "@babel/preset-env",
    "@babel/preset-react"
  ],
  "plugins": [
    "@babel/plugin-proposal-class-properties"
  ]
}
 No newline at end of file

.eslintrc

0 → 100644
+56 −0
Original line number Diff line number Diff line
{
  "parser": "babel-eslint",
  "extends": [
    "airbnb"
  ],
  "rules": {
    "indent": [
      "error",
      4,
      {
        "SwitchCase": 1
      }
    ],
    "react/jsx-indent-props": [
      "error",
      4
    ],
    "react/jsx-indent": [
      "error",
      4
    ],
    "object-curly-spacing": [
      "error",
      "never"
    ],
    "max-len": [
      "error",
      120
    ],
    "react/jsx-tag-spacing": [
      "error",
      {
        "closingSlash": "never",
        "beforeSelfClosing": "never"
      }
    ],
    "react/forbid-prop-types": [
      "error",
      {
        "forbid": [
          "any",
          "array"
        ]
      }
    ],
    "no-underscore-dangle": [
      "error",
      {
        "allow": [
          "_id"
        ]
      }
    ],
    "linebreak-style": 0
  }
}
 No newline at end of file

babel.config.js

0 → 100644
+16 −0
Original line number Diff line number Diff line
module.exports = function (api) {
    api.cache(true);

    const presets = [
        '@babel/preset-env',
        '@babel/preset-react',
    ];
    const plugins = [
        '@babel/plugin-proposal-class-properties',
    ];

    return {
        presets,
        plugins,
    };
};
+957 −0

File changed.

Preview size limit exceeded, changes collapsed.

+8 −1
Original line number Diff line number Diff line
@@ -5,7 +5,8 @@
  "main": "index.js",
  "scripts": {
    "webpack": "webpack",
    "start": "webpack-dev-server"
    "start": "webpack-dev-server",
    "eslint": "eslint src/**/*.jsx"
  },
  "repository": {
    "type": "git",
@@ -40,7 +41,13 @@
    "@babel/plugin-proposal-class-properties": "^7.1.0",
    "@babel/preset-env": "^7.1.0",
    "@babel/preset-react": "^7.0.0",
    "babel-eslint": "^10.0.1",
    "babel-loader": "^8.0.2",
    "eslint": "^5.9.0",
    "eslint-config-airbnb": "^17.1.0",
    "eslint-plugin-import": "^2.14.0",
    "eslint-plugin-jsx-a11y": "^6.1.2",
    "eslint-plugin-react": "^7.11.1",
    "prop-types": "^15.6.2",
    "react": "^16.5.2",
    "react-dnd": "^2.5.4",