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

Add eslint with friends

parent 2358e4a2
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties"
]
}
\ No newline at end of file
{
"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
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,
};
};
This diff is collapsed.
......@@ -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",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment