npm.io
16.1.0 • Published 1 year ago

@waiting/eslint-config

Licence
MIT
Version
16.1.0
Deps
6
Size
20 kB
Vulns
0
Weekly
0
Stars
1

eslint-config

A strict TypeScript ESLint Shareable Config for instead of TSlint

Version License Conventional Commits

Features

  • @waiting/eslint-config/recommended extends and customize from
    • eslint:recommended
    • typescript-eslint/recommended
    • typescript-eslint/stylisticTypeChecked
    • @stylistic/eslint-plugin/recommended-flat
    • eslint-plugin-import
    • eslint-plugin-unicorn
  • @waiting/eslint-config extends @waiting/eslint-config/strict and more strict rules enabled

Install

npm i -D @waiting/eslint-config eslint

Usage

Shareable Configs on the official ESLint website.

Add this to your eslint.config.mjs file:

import tseslint from 'typescript-eslint'
import recommended from './src/recommended.mjs'

const rules = {
  // 'import/no-extraneous-dependencies': 0,
}

export default tseslint.config({
  extends: [
    ...recommended,
  ],
  languageOptions: {
    parserOptions: {
      project: 'tsconfig.eslint.json',
    },
  },
  rules,
})

Linting

npx eslint --fix src/**/*.ts
npx eslint src/**/*.{ts,js}

Learn more

License

MIT

Languages