Skip to content

Instantly share code, notes, and snippets.

@arnoldsandoval
Created June 3, 2017 20:15
Show Gist options
  • Select an option

  • Save arnoldsandoval/667e7125cd809528b7cecb58ef0464ff to your computer and use it in GitHub Desktop.

Select an option

Save arnoldsandoval/667e7125cd809528b7cecb58ef0464ff to your computer and use it in GitHub Desktop.
// ESLint config that uses JS Standard, JSX-a11y and incorporates Seasoned Standards
// Seasoned Standards: https://gist.github.com/arnoldsandoval/b65f4140a4a0d6755d1bfe404ba32f84
module.exports = {
'extends': [
'standard',
'plugin:jsx-a11y/recommended'
],
'plugins': [
'standard',
'promise',
'react',
'jsx-a11y'
],
'parser': 'babel-eslint',
'parserOptions': {
'ecmaFeatures': {
'jsx': true
}
},
'rules': {
'max-len': ['error', 80, { 'ignoreComments': true }],
'no-var': 'error',
'no-unused-vars': ['error', {'varsIgnorePattern': 'style'}],
'object-curly-spacing': ['error', 'always'],
'react/no-danger': 'error',
'react/no-unused-prop-types': [2],
'react/prefer-es6-class': 'error',
'react/prefer-stateless-function': [2, {}],
'react/display-name': [2, { 'ignoreTranspilerName': false }],
'react/require-default-props': 'error',
'react/sort-comp': [2, {
order: [
'static-methods',
'lifecycle',
'render',
'everything-else'
],
groups: {
lifecycle: [
'constructor',
'getChildContext',
'componentWillMount',
'componentDidMount',
'componentWillReceiveProps',
'shouldComponentUpdate',
'componentWillUpdate',
'componentDidUpdate',
'componentWillUnmount',
'displayName',
'propTypes',
'contextTypes',
'childContextTypes',
'mixins',
'statics',
'defaultProps',
'getDefaultProps',
'getInitialState',
'state'
]
}
}],
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
'react/jsx-tag-spacing': [2, {}],
'react/jsx-indent-props': [2, 'tab'|2],
'react/jsx-indent': [2, 'tab'|2],
'react/jsx-curly-spacing': [2, 'never'],
'react/jsx-first-prop-new-line': 'error',
'react/jsx-closing-bracket-location': [2, 'tag-aligned'],
'react/jsx-pascal-case': [2, { allowAllCaps: false }]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment