gitlab gitlab-ci-utils/eslint-config-standard 28.0.0

latest releases: 47.0.0, 46.0.3, 46.0.2...
2 years ago

Changed

  • BREAKING: Updated all configs to flat config
    and require ESLint v9+. Config files have been renamed such that files that
    are singular (for example jest-config.js) export a single config object,
    but those that are plural (for example unicorn-configs.js) export an array
    of config objects. See the documentation for updated usage information.
    (#113)
    • Moved all plugins from peerDependencies to dependencies since they are
      now required for flat config.
    • Most rule configs are now applicable to *.{js,mjs,cjs} file extensions.
      In some cases this dropped support for *.jsx, *.ts, and *.tsx files,
      but support for them was previously inconsistent.
    • The exceptions are vitest-config and esm-config, which are ESM only,
      so they do not support *.cjs files. Rule
      vitest/consistent-test-filename was updated to match this convention.
    • See the README for additional details.
    • With flat config, rules references do not have to match the plugin name, so
      updated rule prefixes to be more usable. Any suppressions for the following
      rules will need to be updated.
    • Plugin eslint-plugin-n rules are now node/ instead of n/.
    • Plugin @eslint-community/eslint-comments rules are now comments/
      instead of @eslint-community/eslint-comments/.
    • The default ESLint rules are now in config base-configs.js.
    • Added rule spaced-comment as an error.
    • The deprecated formatting rules have been removed.
    • Deprecated rules no-new-object, no-new-symbol, and no-return-await
      have been removed.
    • Renamed the recommended-vitest config to recommended-esm.js and added
      the esm-config rules.
  • BREAKING: Updated to eslint-plugin-unicorn@53.0.0 and added the following new rules as errors:
    consistent-empty-array-spread,
    prefer-string-raw,
    no-invalid-fetch-options,
    no-magic-array-flat-depth,
    prefer-structured-clone.
    Also added the following rules as error from eslint-plugin-unicorn@52.0.0:
    no-await-in-promise-methods,no-single-promise-in-promise-methods,
    no-anonymous-default-export. (#122, #124)
  • BREAKING: Updated to eslint-plugin-n@17.7.0, which renamed rule shebang to hashbang.
  • BREAKING: Added new rule sonarjs2/cognitive-complexity to sonarjs-config
    that has a higher cognitive-complexity threshold of 15. This provides a
    secondary check if the lower threshold of 5 in the
    sonarjs/cognitive-complexity rule is disabled, which previously allowed
    unbounded complexity. (#84)
  • BREAKING: Deprecated support for Node 21 (end-of-life 2024-06-01) and added
    support for Node 22 (released 2024-04-25). Compatible with all current and
    LTS releases (^18.12.0 || ^20.9.0 || >=22.0.0). (#123)

Fixed

  • Updated to latest dependencies: @eslint-community/eslint-plugin-eslint-comments@4.3.0,
    eslint-plugin-jest@28.5.0, eslint-plugin-jsdoc@48.2.7,
    eslint-plugin-playwright@1.6.2, eslint-plugin-promise@6.2.0,
    eslint-plugin-sonarjs@1.0.3, eslint-plugin-unicorn@53.0.0,
    eslint-plugin-vitest@0.5.4.

Miscellaneous

  • Updated CI pipeline with eslint-config-inspector job to use
    @eslint/config-inspector to
    visualize flat configs.
  • Updated Renovate config to v1.1.0.

Don't miss a new eslint-config-standard release

NewReleases is sending notifications on new releases.