Skip to content

Commit

Permalink
chore: reorder rules to align ESLint 8 categories
Browse files Browse the repository at this point in the history
ESLint 8 changed core rules' category so that we reorder rules.

See also eslint/eslint#13398.
  • Loading branch information
mlc-kurosawatakeshi committed Jan 4, 2022
1 parent 7a9dbd7 commit 827578d
Show file tree
Hide file tree
Showing 2 changed files with 734 additions and 562 deletions.
82 changes: 30 additions & 52 deletions packages/eslint-config-es5/index.js
Expand Up @@ -19,64 +19,14 @@ module.exports = {
*/
rules: {
/*
* --------------------------------------------------------------------
* Possible Errors
* --------------------------------------------------------------------
* Possible Problems
*/

// https://eslint.org/docs/rules/no-template-curly-in-string
'no-template-curly-in-string': 0, // ES5を考慮して無効

/*
* --------------------------------------------------------------------
* Best Practices
* --------------------------------------------------------------------
*/

// https://eslint.org/docs/rules/prefer-named-capture-group
'prefer-named-capture-group': 0, // ES5を考慮して無効

// https://eslint.org/docs/rules/require-unicode-regexp
'require-unicode-regexp': 0, // ES5を考慮して無効


/*
* --------------------------------------------------------------------
* Strict Mode
* --------------------------------------------------------------------
*/

/*
* --------------------------------------------------------------------
* Variables
* --------------------------------------------------------------------
*/

/*
* --------------------------------------------------------------------
* Stylistic Issues
* --------------------------------------------------------------------
*/

// https://eslint.org/docs/rules/comma-dangle
'comma-dangle': [2, {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'never', // ES5を考慮して無効
exports: 'never', // ES5を考慮して無効
functions: 'never', // ES5を考慮して無効
}],

// https://eslint.org/docs/rules/prefer-exponentiation-operator
'prefer-exponentiation-operator': 0, // ES5を考慮して無効

// https://eslint.org/docs/rules/prefer-object-spread
'prefer-object-spread': 0, // ES5を考慮して無効

/*
* --------------------------------------------------------------------
* ECMAScript 6
* --------------------------------------------------------------------
* Suggestions
*/

// https://eslint.org/docs/rules/no-var
Expand All @@ -91,9 +41,18 @@ module.exports = {
// https://eslint.org/docs/rules/prefer-destructuring
'prefer-destructuring': 0, // ES5を考慮して無効

// https://eslint.org/docs/rules/prefer-exponentiation-operator
'prefer-exponentiation-operator': 0, // ES5を考慮して無効

// https://eslint.org/docs/rules/prefer-named-capture-group
'prefer-named-capture-group': 0, // ES5を考慮して無効

// https://eslint.org/docs/rules/prefer-numeric-literals
'prefer-numeric-literals': 0, // ES5を考慮して無効

// https://eslint.org/docs/rules/prefer-object-spread
'prefer-object-spread': 0, // ES5を考慮して無効

// https://eslint.org/docs/rules/prefer-rest-params
'prefer-rest-params': 0, // ES5を考慮して無効

Expand All @@ -102,5 +61,24 @@ module.exports = {

// https://eslint.org/docs/rules/prefer-template
'prefer-template': 0, // ES5を考慮して無効

// https://eslint.org/docs/rules/require-unicode-regexp
'require-unicode-regexp': 0, // ES5を考慮して無効

/*
* Layout & Formatting
*/

// https://eslint.org/docs/rules/comma-dangle
'comma-dangle': [
2,
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'never', // ES5を考慮して無効
exports: 'never', // ES5を考慮して無効
functions: 'never', // ES5を考慮して無効
},
],
},
};

0 comments on commit 827578d

Please sign in to comment.