Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-plugin-evelyn

evelynhathaway1.3kMIT11.0.0

ESLint plugin for my projects with my preferred code style and bugfixes

eslint, eslint-config, eslint-plugin

readme

ESLint Plugin Evelyn icon

ESLint Plugin Evelyn

ESLint plugin for my projects with my preferred code style

npm version check status license: MIT

Description

These are my boilerplate ESLint flat configs.

My code style is very opinionated, so I only use this package on my projects. However, others are welcome to use, copy, or fork this project.

Installation

Save this project to your dev dependencies.

npm install --save-dev eslint-plugin-evelyn

If you are using an --legacy-peer-deps, you will have to install peer dependencies manually. See the peerDependencies in package.json for recommended dependency version ranges.

Usage

Include as many configs as you'd like to use in your config. Extend them in the order that they should be applied, in order of importance, lowest to highest.

Configs Applied to All Files

eslint.config.js

import eslintPluginEvelyn from "eslint-plugin-evelyn";

export default [
    ...eslintPluginEvelyn.configs.base,
    ...eslintPluginEvelyn.configs.node,
];

Configs applied to a specific path

tseslint.config offers support for extends, which is similar can be used with files similarly to ESLint legacy config's overrides.

eslint.config.js

import eslintPluginEvelyn from "eslint-plugin-evelyn";
import tseslint from "typescript-eslint";

export default tseslint.config(
    ...eslintPluginEvelyn.configs.base,
    {
        files: [
            "src/**/*.js",
        ],
        extends: [
            ...eslintPluginEvelyn.configs.node,
        ],
    },
);

ESM TypeScript Next.js React App Example

eslint.config.js

import eslintPluginEvelyn from "eslint-plugin-evelyn";
import tseslint from "typescript-eslint";

export default tseslint.config(
  // Optionally add global ignore file patterns
    {
        ignores: [
            "my-optional-ignored-pattern",
        ],
    },
    ...eslintPluginEvelyn.configs.base,
    ...eslintPluginEvelyn.configs.esm,
    ...eslintPluginEvelyn.configs.react,
    ...eslintPluginEvelyn.configs.next,
    ...eslintPluginEvelyn.configs.typescript,
    ...eslintPluginEvelyn.configs.jest,
    ...eslintPluginEvelyn.configs.testingLibraryReact,
);

package.json (snippet)

Make sure to remove any references to old ESLint plugins or configs and replace the lint script with eslint.

{
  "name": "my-app",
  "type": "module",
  "...": "...",
  "scripts": {
    "...": "...",
    "lint": "eslint"
  }
}

tsconfig.json (snippet)

Strict TypeScript config is recommended for type safety. Consider allowImportingTsExtensions or rewriteRelativeImportExtensions for ESM.

{
  "compilerOptions": {
    "strict": true,
    "allowImportingTsExtensions": true,
    "...": "..."
  }
  "...": "..."
}

Linting

npm run lint

Debugging

  • Make sure you're using the local version of eslint using npm run or npx eslint
  • Use the --debug ESLint CLI flag for determining things like the modules that get loaded
  • Use the --print-config ESLint CLI flag for a minimal computed config

Configs


Semantic Versioning Policy

This plugin follows semantic versioning a-la-ESLint.

  • Patch release (not intended to break your lint build)
    • A bug fix in a rule that results in ESLint reporting fewer or the same amount of errors
    • Improvements to documentation
    • Non-user-facing changes such as refactoring code
    • Re-releasing after a failed release
  • Minor release (might break your lint build)
    • A new config or rule is added
    • A new non-default option is added to an existing rule
    • A bug fix in a rule that results in ESLint reporting more errors
    • An existing rule, config, or part of the public API is deprecated, but still runs/works
    • New capabilities to the public API are added
    • A config is updated in a way that results in ESLint fewer or the same amount of errors
      • The hypothetical removal of semi would be a good example as not enforcing it could create the potential to break your code
  • Major release (likely to break your lint build)
    • A config or rule is removed
    • A config is updated in a way that results in ESLint reporting more errors
    • A newer version of ESLint, a plugin, or Node.js may be required
      • Any changes to the low end of any of the peerDependencies or the engines
    • A rule's default behavior is changed
    • Part of the public API is removed or changed in an incompatible way

License

Copyright Evelyn Hathaway, MIT License

changelog

Changelog

v11.0.0

v10.1.0...v11.0.0 - 2025-02-18

💥 Breaking

  • Make React and Next.js configs apply to non-JSX file extensions to check code like server actions and custom hooks #183 6211328

📦 Package

  • dev: Upgrade in range packages and conventional-changelog-evelyn, fix issue link in changelog c08a4f9

v10.1.0

v10.0.1...v10.1.0 - 2025-02-18

⚡ Improvement

  • Disable @next/next/no-html-link-for-pages Next.js Page Router rule #186 159f65d
  • Disable @typescript-eslint/consistent-type-definitions f027463
  • Disable @typescript-eslint/prefer-nullish-coalescing #184 5523571

📦 Package

  • dev: Upgrade semantic-release and conventional-changelog-evelyn 5531cd2

v10.0.1

v10.0.0...v10.0.1 - 2025-02-16

🐛 Fix

  • Correctly use ESLint global ignore patterns ff32c84

v10.0.0

v9.0.0...v10.0.0 - 2025-02-16

💥 Breaking

  • Upgrade to ESLint v9, flat config, bump peerDependencies, use eslint-stylistic rules, remove babel; mocha; and jsx configs, add next config, remove record-changes, refine lint rule options, require Node v20+ a5af3a5

🧹 Internal

  • Downgrade semantic-release to a version with a commit-analyzer version compatible with conventional-changelog-evelyn a2d6828

v9.0.0

v8.1.0...v9.0.0 - 2023-05-31

💥 Breaking

  • Update peer deps, node range, improve formatting rules and their TypeScript support 198a7d9

🧹 Internal

v8.1.0

v8.0.1...v8.1.0 - 2022-08-21

⚡ Improvement

  • Disable no-unnecessary-type-constraint for TSX files 2b7a7fa

v8.0.1

v8.0.0...v8.0.1 - 2022-08-21

📄 Documentation

  • Add TypeScript import resolve to documented dependencies 6ca14e5

v8.0.0

v7.0.0...v8.0.0 - 2022-08-21

💥 Breaking

  • Lint .mts and .cts files fe2f22a
  • Reenable no-unresolved for TypeScript ESM, disable requiring TS extensions in imports 04bc69a

⚡ Improvement

  • Bump parser options to ES2022 bb9a6c9

🐛 Fix

  • Add missing peer dependency for TypeScript import resolver ac10db0

🧹 Internal

  • Explicitly tell Dependabot to widen versions, simplify CI caching 893978d
  • Switch from ignore to allow in dependabot config a074697

v7.0.0

v6.2.1...v7.0.0 - 2022-07-25

💥 Breaking

  • Remove no-fallthrough rule in favor of native version per #108 96af5ed
  • Remove Vue configs, update peers, improve rulesets e9a8705

⚡ Improvement

  • Install peers by default in npm v7 and above 312c4a0

📦 Package

  • dev: Bump @babel/eslint-parser from 7.14.3 to 7.14.4 0c3151f
  • dev: Bump @babel/eslint-parser from 7.14.4 to 7.14.5 563e45e
  • dev: Bump @babel/eslint-parser from 7.14.5 to 7.14.7 4560f36
  • dev: Bump @babel/eslint-parser from 7.14.7 to 7.14.9 c436cfa
  • dev: Bump @babel/eslint-parser from 7.14.9 to 7.15.0 0b88840
  • dev: Bump @babel/eslint-parser from 7.15.0 to 7.15.4 9fc63f4
  • dev: Bump @semantic-release/git from 9.0.0 to 9.0.1 8c51077
  • dev: Bump @typescript-eslint/eslint-plugin 0900366
  • dev: Bump @typescript-eslint/eslint-plugin 6fad5d2
  • dev: Bump @typescript-eslint/eslint-plugin b5eb260
  • dev: Bump @typescript-eslint/eslint-plugin 49687f0
  • dev: Bump @typescript-eslint/eslint-plugin 5be5b7f
  • dev: Bump @typescript-eslint/eslint-plugin 7505248
  • dev: Bump @typescript-eslint/eslint-plugin 1fcb097
  • dev: Bump @typescript-eslint/eslint-plugin ff22f92
  • dev: Bump @typescript-eslint/eslint-plugin 49aecca
  • dev: Bump @typescript-eslint/eslint-plugin 195c44d
  • dev: Bump @typescript-eslint/eslint-plugin d14930a
  • dev: Bump @typescript-eslint/parser from 4.25.0 to 4.26.0 a2423dc
  • dev: Bump @typescript-eslint/parser from 4.26.0 to 4.26.1 8c34856
  • dev: Bump @typescript-eslint/parser from 4.26.1 to 4.28.4 0f4483f
  • dev: Bump @typescript-eslint/parser from 4.28.4 to 4.28.5 3a0aaae
  • dev: Bump @typescript-eslint/parser from 4.28.5 to 4.29.0 58fecdf
  • dev: Bump @typescript-eslint/parser from 4.29.0 to 4.29.1 8a0151a
  • dev: Bump @typescript-eslint/parser from 4.29.1 to 4.29.2 ef8d1e8
  • dev: Bump @typescript-eslint/parser from 4.29.2 to 4.29.3 cb97d08
  • dev: Bump @typescript-eslint/parser from 4.29.3 to 4.31.0 9d38f66
  • dev: Bump @typescript-eslint/parser from 4.31.0 to 4.31.1 00efb65
  • dev: Bump chalk from 4.1.1 to 4.1.2 f7a1075
  • dev: Bump commitlint from 12.1.4 to 13.1.0 7e77e98
  • dev: Bump eslint from 7.27.0 to 7.28.0 2f7c847
  • dev: Bump eslint from 7.28.0 to 7.31.0 d1b0086
  • dev: Bump eslint from 7.31.0 to 7.32.0 c9ebac3
  • dev: Bump eslint-plugin-import from 2.23.3 to 2.23.4 ec757ae
  • dev: Bump eslint-plugin-import from 2.23.4 to 2.24.0 abae267
  • dev: Bump eslint-plugin-import from 2.24.0 to 2.24.1 94012ca
  • dev: Bump eslint-plugin-import from 2.24.1 to 2.24.2 920c0d6
  • dev: Bump eslint-plugin-jest from 24.3.6 to 24.4.0 f4cac59
  • dev: Bump eslint-plugin-react from 7.23.2 to 7.24.0 7013436
  • dev: Bump eslint-plugin-react from 7.24.0 to 7.25.1 732f480
  • dev: Bump eslint-plugin-regexp from 0.11.0 to 0.12.1 64ec941
  • dev: Bump eslint-plugin-regexp from 0.12.1 to 0.13.2 977e757
  • dev: Bump eslint-plugin-testing-library from 4.10.1 to 4.11.0 50554d7
  • dev: Bump eslint-plugin-testing-library from 4.11.0 to 4.12.0 aff26a5
  • dev: Bump eslint-plugin-testing-library from 4.12.0 to 4.12.1 41cf0eb
  • dev: Bump eslint-plugin-testing-library from 4.12.1 to 4.12.2 6923733
  • dev: Bump eslint-plugin-testing-library from 4.6.0 to 4.10.1 8254f07
  • dev: Bump eslint-plugin-vue from 7.10.0 to 7.11.0 55ddcec
  • dev: Bump eslint-plugin-vue from 7.11.0 to 7.14.0 eb52727
  • dev: Bump eslint-plugin-vue from 7.14.0 to 7.15.0 f1a31fd
  • dev: Bump eslint-plugin-vue from 7.15.0 to 7.15.1 f8c11f8
  • dev: Bump eslint-plugin-vue from 7.15.1 to 7.16.0 61a165b
  • dev: Bump eslint-plugin-vue from 7.16.0 to 7.17.0 25f67f7
  • dev: Bump eslint-plugin-vue from 7.9.0 to 7.10.0 429c2c7
  • dev: Bump lint-staged from 11.0.0 to 11.1.1 410a035
  • dev: Bump lint-staged from 11.1.1 to 11.1.2 a15b80c
  • dev: Bump mocha from 8.4.0 to 9.0.0 a4fef64
  • dev: Bump mocha from 9.0.0 to 9.0.3 0631b2a
  • dev: Bump mocha from 9.0.3 to 9.1.0 7e37658
  • dev: Bump mocha from 9.1.0 to 9.1.1 aa2d7f8
  • dev: Bump semantic-release from 17.4.3 to 17.4.4 6248357
  • dev: Bump semantic-release from 17.4.4 to 17.4.5 bb14769
  • dev: Bump semantic-release from 17.4.5 to 17.4.6 33d54f1
  • dev: Bump semantic-release from 17.4.6 to 17.4.7 3ce603d
  • dev: Bump sort-package-json from 1.50.0 to 1.51.0 fa911ef
  • dev: Bump typescript from 4.3.2 to 4.3.5 2b0aa16
  • dev: Bump typescript from 4.3.5 to 4.4.2 434cccf
  • dev: Bump typescript from 4.4.2 to 4.4.3 8c08350

🧹 Internal

  • Add missing lines from the development additions 9a8337a
  • Update configurations for dependabot, git hooks 08c9059

v6.2.1

v6.2.0...v6.2.1 - 2021-05-27

📦 Package

  • dev: Bump @typescript-eslint/eslint-plugin 5499556
  • dev: Bump @typescript-eslint/parser from 4.24.0 to 4.25.0 d515bf9
  • dev: Bump conventional-changelog-evelyn from 1.3.0 to 1.3.1 47b3f1a
  • dev: Bump eslint-plugin-mocha from 8.1.0 to 8.2.0 5af2e46
  • dev: Bump eslint-plugin-mocha from 8.2.0 to 9.0.0 1155422
  • dev: Bump typescript from 4.2.4 to 4.3.2 f7237c3
  • user: Expand range for npm peer dependencies, upgrade dev 91d9545

v6.2.0

v6.1.0...v6.2.0 - 2021-05-25

⚡ Improvement

  • Remove node from testing configs that have node env 3316a00

Other

  • dev: Bump eslint from 7.26.0 to 7.27.0 9025c49
  • dev: Bump eslint-plugin-import from 2.23.2 to 2.23.3 48a3257
  • dev: Bump eslint-plugin-testing-library from 4.5.0 to 4.6.0 0417fe4

v6.1.0

v6.0.2...v6.1.0 - 2021-05-24

⚡ Improvement

  • Allowed abbreviations list, removed prop-types 02a5b27

v6.0.2

v6.0.1...v6.0.2 - 2021-05-21

🐛 Fix

  • default: Remove no-array-callback-reference 8f1e043

v6.0.1

v6.0.0...v6.0.1 - 2021-05-21

🐛 Fix

  • esm: Better glob for cjs overrides 73f8b07

v6.0.0

v5.0.5...v6.0.0 - 2021-05-21

💥 Breaking

  • Simplify configs into default, remove JSON and markdown 290bccf

⚡ Improvement

  • Add rules to ESM and export new config 8d6e97b
  • Only add TypeScript config to ts and tsx files 84c6d58

🐛 Fix

  • Remove prefer ESM from cjs files 981d3e7

Other

  • dev: Bump eslint-plugin-testing-library from 4.4.0 to 4.5.0 dcb796d

v6.0.0-alpha.4

v6.0.0-alpha.3...v6.0.0-alpha.4 - 2021-05-21

🐛 Fix

  • Remove prefer ESM from cjs files 981d3e7

v6.0.0-alpha.3

v6.0.0-alpha.2...v6.0.0-alpha.3 - 2021-05-21

⚡ Improvement

  • Only add TypeScript config to ts and tsx files 84c6d58

v6.0.0-alpha.2

v6.0.0-alpha.1...v6.0.0-alpha.2 - 2021-05-21

⚡ Improvement

  • Add rules to ESM and export new config 8d6e97b

v6.0.0-alpha.1

v5.0.5...v6.0.0-alpha.1 - 2021-05-21

💥 Breaking

  • Simplify configs into default, remove JSON and markdown 290bccf

Other

  • dev: Bump eslint-plugin-testing-library from 4.4.0 to 4.5.0 dcb796d

v5.0.5

v5.0.4...v5.0.5 - 2021-05-18

🐛 Fix

  • Update unicorn/no-reduce override fa160f2

Other

v5.0.4

v5.0.3...v5.0.4 - 2021-05-18

📦 Package

  • npm: Bump @babel/eslint-parser from 7.14.2 to 7.14.3 d088b7d
  • npm: Bump conventional-changelog-evelyn from 1.2.2 to 1.2.3 4f2819f

v5.0.3

v5.0.2...v5.0.3 - 2021-05-17

📄 Documentation

v5.0.2

v5.0.1...v5.0.2 - 2021-05-17

📦 Package

  • npm: Bump @typescript-eslint/parser from 4.23.0 to 4.24.0 63ca910

v5.0.1

v5.0.0...v5.0.1 - 2021-05-17

📦 Package

  • npm: Bump @typescript-eslint/eslint-plugin 5dc0838

v5.0.0

v4.0.0...v5.0.0 - 2021-05-17

💥 Breaking

  • Update peerDependedcies, bump Node.js minimum, update ruleset 75935c1

✨ Feature

  • Add testing library sub configs de5a263

📦 Package

  • Bump hosted-git-info from 2.8.8 to 2.8.9 b28f237
  • Bump lodash from 4.17.20 to 4.17.21 91c0edb
  • Bump y18n from 4.0.0 to 4.0.1 a261413