Detalhes do pacote

eslint-config-standard-kit

swansontec4.2kMIT1.0.0

Standard.js linting rules - broken into modular pieces

readme (leia-me)

eslint-config-standard-kit

Standard.js is a fantastic collection of linter rules, but it can be difficult to integrate with other code-quality tools like Prettier, TypeScript, or JSX.

This package makes it easy to integrate Standard.js with these other tools by breaking its configuration into modular pieces. Just mix & match the bits you need for your particular setup:

  • TypeScript
  • JSX
  • React
  • Node.js
  • Prettier
  • Simple-import-sort

Easy Setup

First, install ESLint 9 and eslint-plugin-standard-kit:

npm install --save-dev eslint eslint-config-standard-kit

Next, create an eslint.config.mjs config file:

import standardConfig from 'eslint-config-standard-kit'

export default [
  ...standardConfig({
    prettier: true,
    sortImports: true,
    jsx: true,
    node: false,
    react: true,
    typescript: true
  }),
  {
    // Add your own settings here
  }
]

The standardConfig function takes a collection of flags to enable or disable the rules you need. If your tsconfig.json isn't in a normal place, you can also pass a tsconfigRootDir option to provide its location.

If you choose prettier or typescript support, be sure to npm install the corresponding tools in your project.

Configs

If you don't want to use the standardConfig function, you can also import individual config objects:

  • eslint-config-standard-kit/config - Core Standard.js rules
  • eslint-config-standard-kit/config/jsx - JSX support
  • eslint-config-standard-kit/config/node - Node.js support
  • eslint-config-standard-kit/config/react - React support
  • eslint-config-standard-kit/config/typescript - TypeScript support
  • eslint-config-standard-kit/prettier - Core Standard.js rules + Prettier
  • eslint-config-standard-kit/prettier/jsx - JSX support + Prettier
  • eslint-config-standard-kit/prettier/node - Node.js support + Prettier
  • eslint-config-standard-kit/prettier/react - React support + Prettier
  • eslint-config-standard-kit/prettier/typescript - TypeScript support + Prettier

You could use these standalone configs like this:

import baseConfig from 'eslint-config-standard-kit/config'
import tsConfig from 'eslint-config-standard-kit/config/typescript'

export default [
  baseConfig,
  tsConfig,
  {
    // Add your own settings here
  }
]

Rules

This package auto-generates its configuration files based on the official eslint-config-standard, eslint-config-standard-jsx, and eslint-config-standard-react packages. This means you are getting the exact same rules as the official Standard.js project, just combined & filtered into a more convenient format.

The upstream eslint-config-standard-with-typescript package has been renamed to eslint-config-love, and is no longer part of the Standard.js ecosystem. Since there is no longer an official TypeScript solution, eslint-config-standard-kit simply filters eslint-config-love down to be more Standard.js-aligned.

Contributing

Pull requests are welcome! This library uses its own rules for linting & formatting, so please be sure the pre-commit hooks pass.

The unit tests use a snapshot system to verify that our output doesn't change. If you need to update the snapshots, just run UPDATE=1 yarn test to re-generate those.

To test the web interface, just use yarn prepare to compile the code, then open / refresh public/index.html.

changelog (log de mudanças)

eslint-config-standard-kit

Unreleased

1.0.0 (2025-07-30)

  • added: New standardConfig rule-configuration function.
  • changed: Rename top-level entry-points like /typescript.js to /config/typescript.
  • changed: Upgrade everything to ESLint 9 flat-config format.
  • changed: Upgrade to the latest upstream rules.
  • changed: Replace eslint-config-standard-with-typescript with a filtered version of eslint-config-love.
  • removed: /lint entry-points.
  • removed: Flow support.
  • removed: Configuration website. Use the new standardConfig helper function.

0.15.1 (2020-12-16)

  • Fix Flow rules not not affect Typescript files. This solves an issue in the previous release, where enabling both Flow & Typescript in the same project would cause errors in Typescript files.
  • Handful of internal code cleanups.

0.15.0 (2020-12-15)

  • Upgrade all dependencies, including:
    • ESLint 7
    • Standard.js 16
    • typescript-eslint 4
  • Add a React configuration based on eslint-config-standard-react and eslint-plugin-react-hooks.

0.14.6 (2020-12-09)

  • web: Fix the missing lint-staged dependency in the generated output.

0.14.5 (2020-11-24)

  • Update documentation.
  • Improve unit-testing & other internal code-quality tooling.
  • Update the configuration web page:
    • Require compatible dependency versions (using ^) in the generated package.json.
    • Add a fix script to the generated package.json.
    • Add a typescript dependency when necessary.
    • Show the current eslint-config-standard-kit version number.
    • Add a visual shadow the the buttons.

0.14.4 (2019-10-17)

  • Fix the NPM package to include the newly-added files.

0.14.3 (2019-10-17)

  • Add a web page to help generate configurations for new projects.
  • Add a set of standard-kit/prettier rules with Prettier pre-integrated.
  • Deprecate the standard-kit/lint rules.

0.14.2 (2019-10-07)

  • Include setTimeout & friends in the core list of globals.
  • Update the readme & generated files to give credit to the upstream rule sets.

0.14.1 (2019-09-30)

  • Only use the TypeScript parser for .ts and .tsx files, which allows TypeScript and Flow to coexist in the same project now.

0.14.0 (2019-09-25)

  • Upgrade to Standard.js 14.
  • Base TypeScript support on eslint-config-standard-with-typescript.

0.13.0 (2019-07-30)

  • Upgrade to Standard.js 13.

0.12.2 (2019-07-30)

  • Bring more typescript rules in line with Standard.js:
    • Remove @typescript-eslint/explicit-member-accessibility.
    • Adjust @typescript-eslint/no-use-before-define.

0.12.1 (2019-04-24)

  • Add missing files to NPM package.

0.12.0 (2019-04-24)

  • Initial release based on Standard.js 12.