Skip to content

Instantly share code, notes, and snippets.

@mogetutu
Forked from zackify/.eslintrc
Created November 9, 2015 13:54
Show Gist options
  • Save mogetutu/0f78aa1469e54607bd15 to your computer and use it in GitHub Desktop.
Save mogetutu/0f78aa1469e54607bd15 to your computer and use it in GitHub Desktop.
Upgrade to Babel 6
{
"parser": "babel-eslint",
"env": {
"es6": true,
"mocha": true,
"node": true
},
"ecmaFeatures": {
"blockBindings": true,
"forOf": true,
"jsx": true,
"modules": true
},
"rules": {
"indent": [2, 2],
"max-len": 0,
"semi": 0,
"quotes": 0,
"semi": [2, "never"],
"no-unused-vars": 2,
"no-undef": 2,
"no-console": 0,
"no-trailing-spaces": 0,
"curly": 0,
"camelcase": 0,
"react/jsx-boolean-value": 1,
"jsx-quotes": 1,
"react/jsx-no-undef": 1,
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
"react/no-did-mount-set-state": 0,
"react/no-did-update-set-state": 1,
"react/no-multi-comp": 1,
"react/no-unknown-property": 1,
"react/prop-types": 0,
"react/react-in-jsx-scope": 0,
"react/self-closing-comp": 1,
"react/sort-comp": 1,
"react/wrap-multilines": 1,
"new-cap": [1, {"newIsCap": true, "capIsNew": false}],
},
"plugins": [
"react"
]
}
"devDependencies": {
"babel-plugin-syntax-class-properties": "^6.0.14",
"babel-preset-react": "^6.1.2",
"eslint": "^1.9.0",
"eslint-loader": "^1.1.1",
"babel-core": "^6.1.2",
"babel-loader": "^6.0.1",
"babel-preset-es2015": "^6.1.2",
},
module.exports = {
entry: {
overview: './resources/assets/js/overview.jsx'
},
output: {
path: __dirname + "/public/assets/js",
filename: "[name].js"
},
module: {
loaders: [
{
test: /\.jsx|.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
plugins: ["syntax-class-properties"],
presets: ["es2015", "react"]
}
},
{
test: /\.jsx|.js$/,
exclude: /node_modules/,
loader: 'eslint-loader'
},
{
test: /\.json$/,
exclude: /node_modules/,
loader: 'json-loader'
}
]
},
resolve: {
extensions: ['', '.js', '.jsx']
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment