Last active
February 4, 2019 18:34
-
-
Save NeuTrix/d4e3cb009b7ec28132c8f8c8f3cb6c0e to your computer and use it in GitHub Desktop.
eslintrc.json for airbnb styleguide. Place in the root folder of js application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"env": { | |
"browser": true, | |
"es6": true, | |
"node": true, | |
"jest": true | |
}, | |
"extends": [ | |
"airbnb", | |
"plugin:jsx-a11y/recommended", | |
"plugin:react/recommended", | |
"plugin:import/errors", | |
"plugin:import/warnings" | |
], | |
"parserOptions": { | |
"ecmaVersion": 6, | |
"sourceType": "module", | |
"ecmaFeatures": { "jsx": true } | |
}, | |
"rules": { | |
"indent": ["error", "tab"], | |
"max-len": ["warn", | |
{ "code": 100 } | |
], | |
"no-console": "off", | |
"no-return-assign": ["error", "except-parens"], | |
"no-tabs": ["error", { | |
"allowIndentationTabs": true | |
}], | |
"no-underscore-dangle": ["warn", { | |
"allow": ["_id"] | |
}], | |
"padded-blocks": ["error", { | |
"blocks": "never" | |
}], | |
"react/display-name": [ "warn" , { | |
"ignoreTranspilerName": false | |
}], | |
"react/jsx-filename-extension": [1, { | |
"extensions": [".js", ".jsx"] | |
}], | |
"react/jsx-indent": ["error", "tab"], | |
"react/jsx-indent-props": ["error", "tab"], | |
"react/require-default-props": [ 1 , { | |
"forbidDefaultForRequired": false | |
}], | |
"react/jsx-sort-props": ["error", { | |
"callbacksLast": true, | |
"ignoreCase": true, | |
"noSortAlphabetically": true, | |
"reservedFirst": true | |
}], | |
"space-in-parens": ["error", "never"], | |
"sort-keys": ["warn", "asc", { | |
"caseSensitive": true, | |
"natural": false | |
}], | |
"sort-imports": ["warn", { | |
"ignoreCase": true, | |
"ignoreMemberSort": false, | |
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"] | |
}], | |
"sort-vars": ["error", { | |
"ignoreCase": true | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment