Skip to content

Instantly share code, notes, and snippets.

@thehig
Created December 11, 2016 13:43
Show Gist options
  • Save thehig/b8c41fb78bb86dcc48b245cd1e8f85e0 to your computer and use it in GitHub Desktop.
Save thehig/b8c41fb78bb86dcc48b245cd1e8f85e0 to your computer and use it in GitHub Desktop.
js: .eslintrc.js
// Install NPM Modules:
// yarn add eslint babel-eslint eslint-plugin-react eslint-plugin-import eslint-plugin-redux eslint-plugin-immutable --dev
module.exports = {
"parser": "babel-eslint",
// Globals: // http://eslint.org/docs/user-guide/configuring#specifying-globals
"globals": {
// "foo": true
},
// Parser Options: // http://eslint.org/docs/user-guide/configuring#specifying-parser-options
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
// Environment: // http://eslint.org/docs/user-guide/configuring#specifying-environments
"env": {
"node": true,
"commonjs": true,
"es6": true,
"mocha": true
},
// Plugins : // http://eslint.org/docs/user-guide/configuring#configuring-plugins
"plugins": [
"react", // https://www.npmjs.com/package/eslint-plugin-react
"import", // https://www.npmjs.com/package/eslint-plugin-import
// "redux",
// "immutable" // https://www.npmjs.com/package/eslint-plugin-immutable
],
// Extends: // http://eslint.org/docs/user-guide/configuring#extending-configuration-files
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:import/recommended",
// "plugin:import/warnings",
// "plugin:immutable/recommended",
],
// Rules: // http://eslint.org/docs/user-guide/configuring#configuring-rules
"rules": {
// Generic Rules:
"no-console": "warn",
// "no-undef": "off",
// "no-unused-vars": "off",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment