Skip to content

Instantly share code, notes, and snippets.

@ogiermaitre
Last active May 17, 2018 12:56
Show Gist options
  • Select an option

  • Save ogiermaitre/50340b7352696dd1487544c564c3717f to your computer and use it in GitHub Desktop.

Select an option

Save ogiermaitre/50340b7352696dd1487544c564c3717f to your computer and use it in GitHub Desktop.
[Some eslint tips] #javascript #eslint #node #es6
module.exports = {
'env': {
node: true,
es6: true,
browser: true,
},
'extends': [
'airbnb-base',
'eslint:recommended',
],
'parserOptions': {
'ecmaFeatures': {
'experimentalObjectRestSpread': true,
},
'sourceType': 'module'
},
rules: {
'consistent-this': 'off',
'no-tabs': 'off',
'indent': ['error', 'tab'],
'arrow-parens': ['error', 'as-needed'],
'no-unused-vars': [
'error',
{
'vars': 'all',
'args': 'after-used',
'ignoreRestSiblings': true
}
],
'comma-dangle': [
'error',
{
'arrays': 'always-multiline',
'objects': 'always-multiline',
'imports': 'always-multiline',
'exports': 'always-multiline',
'functions': 'ignore'
}
],
'no-underscore-dangle': 'off',
'max-len': [
'off',
120
],
'no-magic-numbers': 'off',
'no-extra-parens': 'error',
eqeqeq: ['error', 'always'],
'no-var': 'error',
'quotes': [
'error',
'single'
],
'semi': ['error','never'],
'no-console': 0,
"strict": [1, 'global'],
'import/prefer-default-export':'off',
}
};
/* eslint no-global-assign: 0 */
{
"devDependencies": {
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.11.0"
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment