forked from theRAPTLab/meme
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from theRAPTLab/dev-sri/build-config-fixes
FIX: Relax excessive ESLint configuration rules
- Loading branch information
Showing
8 changed files
with
274 additions
and
266 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,95 @@ | ||
/*///////////////////////////////// ABOUT \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\ | ||
eslint configuration for MEME | ||
updated 2024-06-18 | ||
\*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ * /////////////////////////////////////*/ | ||
|
||
/// CONFIG BLOCKS ///////////////////////////////////////////////////////////// | ||
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
/** base eslint configuration */ | ||
const CONFIG = { | ||
'env': { | ||
'browser': true, | ||
'commonjs': true, | ||
'es6': true, | ||
'node': true | ||
}, | ||
'plugins': ['import', 'prettier', 'react'], | ||
'extends': ['airbnb', 'prettier'], | ||
'globals': { | ||
'PACKAGE_TITLE': 'readonly', // injected by webpack | ||
'PACKAGE_VERSION': 'readonly', // injected by webpack | ||
'PACKAGE_DESCRIPTION': 'readonly', // injected by webpack | ||
'__static': 'readonly' // injected by webpack | ||
}, | ||
'parserOptions': { | ||
'ecmaVersion': 2020, | ||
'ecmaFeatures': { | ||
'jsx': true | ||
}, | ||
'sourceType': 'module' | ||
} | ||
}; | ||
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
/** relaxations of rules that we don't mind */ | ||
const INQ_RULES = { | ||
'prettier/prettier': ['warn'], | ||
'no-console': 'off', | ||
'no-debugger': 'warn', | ||
'no-alert': 'warn', | ||
'spaced-comment': 'off', | ||
'react/jsx-filename-extension': [ | ||
1, | ||
{ | ||
'extensions': ['.js', '.jsx'] | ||
} | ||
], | ||
'no-unused-vars': 'off', | ||
'arrow-body-style': 'off', | ||
'camelcase': 'off', | ||
'no-use-before-define': 'off', | ||
'import/no-extraneous-dependencies': [ | ||
'error', | ||
{ | ||
'devDependencies': true | ||
} | ||
], | ||
'no-underscore-dangle': 'off', | ||
'no-plusplus': 'off', | ||
'prefer-const': 'off', | ||
'one-var': 'off', | ||
'prefer-destructuring': 'off', | ||
'class-methods-use-this': 'off', | ||
'import/prefer-default-export': 'off', | ||
// habit rules warnings | ||
'no-param-reassign': 'warn', | ||
'no-shadow': 'warn', | ||
'grouped-accessor-pairs': 'warn', | ||
'import/no-duplicates': ['warn', { 'considerQueryString': true }], | ||
'radix': 'as-needed' | ||
}; | ||
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
/** react rules that we don't like */ | ||
const REACT_ICKS = { | ||
'react/no-unescaped-entities': 'off', | ||
'react/destructuring-assignment': 'off', | ||
'react/jsx-one-expression-per-line': 'off', | ||
// new with removal of prettier/react, which is now included in prettier | ||
'react/no-unused-class-component-methods': 'off', | ||
'react/no-unused-prop-types': 'warn', | ||
'react/no-unused-state': 'warn', | ||
'react/prop-types': 'warn', | ||
'react/jsx-props-no-spreading': 'warn', | ||
'react/no-array-index-key': 'warn' | ||
}; | ||
|
||
/// EXPORTS /////////////////////////////////////////////////////////////////// | ||
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
module.exports = { | ||
...CONFIG, // base eslint config | ||
rules: { | ||
...INQ_RULES, // default inq styles | ||
...REACT_ICKS | ||
} | ||
}; |
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
Oops, something went wrong.