forked from cwilbur12/kin-web-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e0f71f
commit 227200b
Showing
3 changed files
with
91 additions
and
92 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
module.exports = { | ||
extends: ["airbnb", "prettier"], | ||
parserOptions: { | ||
ecmaVersion: 6, | ||
sourceType: "module", | ||
ecmaFeatures: { | ||
impliedStrict: true, | ||
jsx: true | ||
} | ||
}, | ||
env: { | ||
browser: true | ||
}, | ||
rules: { | ||
// Both styles are awesome ;) | ||
"arrow-body-style": "off", | ||
|
||
// Forces class to use `this` or be `static`, making them arguably | ||
// harder to update, thus decreasing the semantic meaning of `static`. | ||
"class-methods-use-this": "off", | ||
|
||
// with prettier, we get extra commas in function args which (still) | ||
// creates issues in some JS parsers | ||
"comma-dangle": "off", | ||
|
||
// Autofocus can be useful to have more control in forms. | ||
"jsx-a11y/no-autofocus": "off", | ||
|
||
// FIXME: usages of handlers on static element, this would increase | ||
// accessibility | ||
"jsx-a11y/no-static-element-interactions": "off", | ||
|
||
// Enable 100 chars lines, with a couple of exceptions | ||
"max-len": [ | ||
"error", | ||
100, | ||
2, | ||
{ | ||
ignoreUrls: true, | ||
ignoreComments: true, | ||
ignoreStrings: true, | ||
ignoreTemplateLiterals: true | ||
} | ||
], | ||
|
||
// Bitwise operations can be useful, confusing them with logical | ||
// operators should be catch with unit tests, not a linter | ||
"no-bitwise": "off", | ||
|
||
// FIXME: no proper logging in the client, so `console` is used :/ | ||
"no-console": "off", | ||
|
||
// Personal choice for Kin | ||
"no-underscore-dangle": "off", | ||
|
||
// Do not use half-indentation common in React projects | ||
"react/jsx-indent": ["error", 4], | ||
|
||
// (mostly) useless | ||
"react/require-default-props": 0, | ||
|
||
// Personal choice for Kin | ||
camelcase: "off", | ||
|
||
// Personal choice for Kin | ||
indent: ["error", 4] | ||
}, | ||
globals: { | ||
// Those are both injected by webpack (see webpack config) | ||
$: false, | ||
KIN_ENV_NAME: false | ||
}, | ||
settings: { | ||
"import/resolver": { | ||
"babel-module": {} | ||
} | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,22 @@ | ||
module.exports = { | ||
"extends": "airbnb", | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"impliedStrict": true, | ||
} | ||
env: { | ||
mocha: true | ||
}, | ||
"env": { | ||
"browser": true, | ||
"mocha": true, | ||
}, | ||
"rules": { | ||
"camelcase": 0, | ||
"no-underscore-dangle": 0, | ||
"indent": ["error", 4], | ||
|
||
//TODO: those could probably be re-enabled | ||
"new-cap": [2], | ||
|
||
// Disable preference because mocha recommends not using arrow functions | ||
"prefer-arrow-callback": 0, | ||
|
||
// Prevent warnings for function in mocha's describe/it | ||
"func-names": 0, | ||
|
||
// Disabling this because of chai's `expect` format | ||
rules: { | ||
// tldr: chai uses syntax close to property access, without actually | ||
// saving its result, which is exactly what this rule is trying to avoid. | ||
// | ||
// https://github.com/eslint/eslint/issues/2102 | ||
"no-unused-expressions": 0, | ||
|
||
// Both styles are awesome ;) | ||
"arrow-body-style": 0, | ||
"no-unused-expressions": "off", | ||
|
||
// This rule is stoopid ;) | ||
"class-methods-use-this": 0, | ||
// Mocha recommends not using arrow functions to keep its context | ||
"prefer-arrow-callback": "off", | ||
|
||
// Let's not complain about deps being used in tests | ||
"import/no-extraneous-dependencies": [ | ||
"error", | ||
{ | ||
"devDependencies": ["**/*.test.js"], | ||
}, | ||
], | ||
// Mocha `describe` / `it` common usage uses a lot of unnamed functions | ||
"func-names": "off" | ||
}, | ||
globals: { | ||
chai: false, | ||
sinon: false, | ||
$: false, | ||
chai: true, | ||
sinon: true | ||
} | ||
} | ||
}; |