phetsims/chipper

Audit deprecated eslint rules

zepumph opened this issue · 0 comments

While working on #1429, I found that the JSON output provides a list eslint rules that we use that are deprecated. Perhaps we should discuss if these should be updated or changed.

Here is the list of deprecated rules I got from running the below script in chipper. This also may be a helpful link: https://eslint.org/docs/latest/rules/#deprecated

eol-last
no-extra-semi
no-floating-decimal
no-new-object->no-object-constructor
no-return-await
one-var-declaration-per-line
quote-props
array-bracket-spacing
arrow-parens
arrow-spacing
brace-style
comma-dangle
comma-spacing
comma-style
computed-property-spacing
func-call-spacing
generator-star-spacing
jsx-quotes
key-spacing
keyword-spacing
lines-between-class-members
new-parens
no-mixed-spaces-and-tabs
no-multi-spaces
no-multiple-empty-lines
no-tabs
no-trailing-spaces
no-whitespace-before-property
nonblock-statement-body-position
object-curly-newline
object-curly-spacing
padding-line-between-statements
quotes
rest-spread-spacing
semi
semi-spacing
semi-style
space-before-blocks
space-before-function-paren
space-in-parens
space-infix-ops
space-unary-ops
switch-colon-spacing
template-curly-spacing
template-tag-spacing
yield-star-spacing
no-spaced-func->func-call-spacing
 const deprecatedRules = [];
    results.forEach( result => {
      deprecatedRules.push( ...result.usedDeprecatedRules.map( x => {
        return x.replacedBy.length > 0 ?
               `${x.ruleId}->${x.replacedBy.join( ',' )}` :
               x.ruleId;
      } ) );
    } );
    console.log( _.uniq( deprecatedRules ).join( '\n' ) );