Skip to content

Commit

Permalink
remove eslint 'standard' and disable some rules
Browse files Browse the repository at this point in the history
because I think they will be taken care of by prettier now
  • Loading branch information
tjenkinson committed Dec 23, 2020
1 parent f4f5716 commit ae63ca3
Show file tree
Hide file tree
Showing 4 changed files with 375 additions and 204 deletions.
48 changes: 4 additions & 44 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,49 +14,15 @@ module.exports = {
__USE_ALT_AUDIO__: true,
__USE_EME_DRM__: true,
},
// see https://standardjs.com/
// see https://github.com/standard/eslint-config-standard
// 'prettier' (https://github.com/prettier/eslint-config-prettier) must be last
extends: ['eslint:recommended', 'standard', 'prettier'],
extends: ['eslint:recommended', 'prettier'],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
plugins: ['@typescript-eslint', 'import'],
rules: {
// our basic style rules
semi: ['error', 'always'],
indent: ['error', 2],
quotes: ['error', 'single'],
'linebreak-style': ['error', 'unix'],
// spacing
'space-infix-ops': 2,
'space-unary-ops': [2, { words: true, nonwords: false }],
'space-in-parens': ['error', 'never'],
'keyword-spacing': [2, { before: true, after: true }],
// enforce litteral objects on multiple lines
'block-spacing': 'error',
curly: 2,
'object-curly-spacing': ['error', 'always'],
'brace-style': ['error', '1tbs', { allowSingleLine: false }],

// limit code block and line length
/*
"max-len": 1,
"max-statements": 1,
"max-depth": 1,
"max-nested-callbacks": 1,
"max-params": 1,
"max-statements": 1,
"max-statements-per-line": 1
*/

// loosening of code-quality rules we may want to fix later
// (warnings for now)

// forbid "one var" style, enforce one declaration per variable
'one-var': 2,

'no-restricted-globals': [
2,
{
Expand All @@ -83,12 +49,10 @@ module.exports = {
{ property: 'find' }, // Intended to block usage of Array.prototype.find
],

'standard/no-callback-literal': 0,
'import/first': 1,
'no-var': 1,
'no-empty': 1,
'no-mixed-operators': 2,
'no-unused-vars': 2,
'no-unused-vars': 'warn',
'no-console': [
1,
{
Expand All @@ -97,15 +61,12 @@ module.exports = {
],
'no-fallthrough': 1,
'no-case-declarations': 2,
'no-irregular-whitespace': 1,
'no-self-assign': 1,
'new-cap': 1,
'no-undefined': 0,
'no-global-assign': 2,
'prefer-const': 2,
'dot-notation': 2,
'array-bracket-spacing': 2,
'quote-props': 2,
'no-void': 2,
'no-useless-catch': 2,
'no-prototype-builtins': 0,
Expand All @@ -117,8 +78,7 @@ module.exports = {
'no-unused-vars': 0,
'no-undef': 0,
'no-use-before-define': 'off',
// '@typescript-eslint/no-use-before-define': ['error'],
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/prefer-optional-chain': 2,
'@typescript-eslint/consistent-type-assertions': [
2,
Expand Down
Loading

0 comments on commit ae63ca3

Please sign in to comment.