2.0.1 • Published 10 months ago

@atomixdesign/eslint-config v2.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Legacy .eslintrc (eslint <= 8)

Installation

yarn add --dev eslint@^8.0.0 @atomixdesign/eslint-config@^1.0.0

Add the following into your .eslintrc file:

{
  "extends": "@atomixdesign/eslint-config/recommended"
}

Usage with React

Also include the following npm dependencies:

yarn add --dev eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks

And use the React config instead in your .eslintrc:

{
  "extends": "@atomixdesign/eslint-config/react"
}

eslint.config.js (eslint >= 9)

Installation

yarn add --dev eslint @atomixdesign/eslint-config

Add the following into your eslint.config.mjs file (note the .mjs, not .js):

import config from "@atomixdesign/eslint-config"

export default [
    ...config
];

Usage with React

Add the additional react config into your eslint.config.mjs file (note the .mjs, not .js):

import config from "@atomixdesign/eslint-config"
import reactConfig from "@atomixdesign/eslint-config/react"

export default [
    ...config,
    ...reactConfig
];