Skip to content

Instantly share code, notes, and snippets.

@davidcostadev
Created February 8, 2019 20:51
Show Gist options
  • Save davidcostadev/dfa95d5eb01122b1851c1b21baab41a1 to your computer and use it in GitHub Desktop.
Save davidcostadev/dfa95d5eb01122b1851c1b21baab41a1 to your computer and use it in GitHub Desktop.
Lint config
{
"presets": [
"react",
"stage-0",
[
"env",
{
"useBuiltIns": "entry"
}
]
],
"plugins": [
"react-hot-loader/babel",
[
"module-resolver",
{
"root": [
"./src"
],
"alias": {
"components": "./src/client/components",
"actions": "./src/client/redux/actions",
"reducers": "./src/client/redux/reducers",
"styles": "./src/scss",
"app": "./src/client",
"apps": "./src/client/apps",
"texts": "./texts"
}
}
],
[
"transform-class-properties",
{
"spec": true
}
],
[
"transform-runtime",
{
"polyfill": false,
"regenerator": true
}
]
]
}
module.exports = {
parser: 'babel-eslint',
plugins: ['react', 'prettier'],
extends: ['airbnb', 'prettier'],
env: { es6: true },
rules: {
'arrow-body-style': ['error', 'as-needed'],
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'no-return-assign': 'off',
'react/destructuring-assignment': 'off',
'react/forbid-prop-types': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'react/jsx-one-expression-per-line': 'off',
'prettier/prettier': ['error'],
},
settings: {
'import/resolver': 'webpack',
},
env: {
browser: true,
node: true,
es6: true,
amd: true,
mocha: true,
jest: true,
},
};
{
"printWidth": 100,
"singleQuote": true,
"trailingComma": "all"
}
{
"plugins": ["stylelint-prettier"],
"extends": ["stylelint-config-prettier", "stylelint-config-rational-order"],
"rules": {
"indentation": 2,
"string-quotes": "double",
"no-duplicate-selectors": true,
"color-hex-case": "upper",
"color-hex-length": "long",
"selector-combinator-space-after": "always",
"selector-attribute-quotes": "always",
"selector-attribute-operator-space-before": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-brackets-space-inside": "never",
"declaration-no-important": true,
"declaration-colon-space-before": "never",
"declaration-colon-space-after": "always",
"property-no-vendor-prefix": true,
"number-leading-zero": "always",
"function-url-quotes": "always",
"comment-whitespace-inside": "always",
"comment-empty-line-before": "always",
"rule-empty-line-before": ["always", { "except": ["first-nested"] }],
"selector-pseudo-class-parentheses-space-inside": "never",
"media-feature-range-operator-space-before": "always",
"media-feature-range-operator-space-after": "always",
"media-feature-parentheses-space-inside": "never",
"media-feature-colon-space-before": "never",
"media-feature-colon-space-after": "always"
}
}
babel-eslint
eslint
eslint-config-airbnb
eslint-config-prettier
eslint-import-resolver-webpack
eslint-plugin-import
eslint-plugin-jsx-a11y
eslint-plugin-prettier
eslint-plugin-react
prettier
stylelint
stylelint-config-prettier
stylelint-config-rational-order
stylelint-prettier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment