@eslint/js
TypeScript icon, indicating that this package has built-in type declarations

10.0.1 • Public • Published

npm version Downloads Build Status
Open Collective Backers Open Collective Sponsors

ESLint JavaScript Plugin

Website | Configure ESLint | Rules | Contribute to ESLint | Report Bugs | Code of Conduct | X | Discord | Mastodon | Bluesky

The beginnings of separating out JavaScript-specific functionality from ESLint.

Right now, this plugin contains two configurations:

  • recommended - enables the rules recommended by the ESLint team (the replacement for "eslint:recommended")
  • all - enables all ESLint rules (the replacement for "eslint:all")

Installation

You can install ESLint using npm or other package managers:

npm install eslint -D
# or
yarn add eslint -D
# or
pnpm install eslint -D
# or
bun add eslint -D

Then install this plugin:

npm install @eslint/js -D
# or
yarn add @eslint/js -D
# or
pnpm install @eslint/js -D
# or
bun add @eslint/js -D

Usage

Use in your eslint.config.js file anytime you want to extend one of the configs:

import { defineConfig } from "eslint/config";
import js from "@eslint/js";

export default defineConfig([
	// apply recommended rules to JS files
	{
		name: "your-project/recommended-rules",
		files: ["**/*.js"],
		plugins: {
			js,
		},
		extends: ["js/recommended"],
	},

	// apply recommended rules to JS files with an override
	{
		name: "your-project/recommended-rules-with-override",
		files: ["**/*.js"],
		plugins: {
			js,
		},
		extends: ["js/recommended"],
		rules: {
			"no-unused-vars": "warn",
		},
	},

	// apply all rules to JS files
	{
		name: "your-project/all-rules",
		files: ["**/*.js"],
		plugins: {
			js,
		},
		extends: ["js/all"],
		rules: {
			"no-unused-vars": "warn",
		},
	},
]);

License

MIT

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
9.39.443,393,092maintenance
10.0.18,619,984latest
10.0.0-rc.015next

Version History

VersionDownloads (Last 7 Days)Published
9.39.443,393,092
9.39.32,860,710
10.0.18,619,984
10.0.0-rc.015
9.39.28,369,299
10.0.0-alpha.19
10.0.0-alpha.010
9.39.13,304,663
9.39.0172,404
9.38.0956,117
9.37.0860,610
9.36.02,467,715
9.35.0850,205
9.34.0779,044
9.33.0774,993
9.32.09,249,278
9.31.01,066,690
9.30.1315,174
9.30.0106,588
9.29.0956,100
9.28.0431,258
9.27.0423,765
9.26.0605,743
9.25.1256,540
9.25.064,693
9.24.0314,013
9.23.0455,455
9.22.0255,583
9.21.0205,426
9.20.0300,133
9.19.0339,138
9.18.0256,911
9.17.0380,843
9.16.0160,534
9.15.0246,037
9.14.0165,961
9.13.0673,662
9.12.0684,952
9.11.1108,034
9.11.07,517
8.57.121,088,112
9.10.0245,386
9.9.1104,542
9.9.082,332
9.8.076,270
9.7.063,243
9.6.043,171
9.5.026,761
9.4.038,982
9.3.037,923
9.2.034,725
9.1.134,710
9.1.0125
9.0.0117,274
9.0.0-rc.02,621
9.0.0-beta.214
9.0.0-beta.128
8.57.04,591,479
9.0.0-beta.036
9.0.0-alpha.220
9.0.0-alpha.155
9.0.0-alpha.058
8.56.01,018,077
8.55.0138,981
8.54.0143,481
8.53.0279,935
8.52.0159,760
8.51.0148,115
8.50.0169,749
8.49.0196,080
8.48.0202,925
8.47.087,877
8.46.087,605
8.45.01,229
8.44.0254,409
8.43.0118,043
8.42.097,908
8.41.0131,378
8.40.0108,431
8.39.0144,316
8.38.0104,840
8.37.099,307
8.36.0134,264
8.35.0131,918
8.34.013
8.33.069