odin-js-fundamentals-part-4/node_modules/@eslint/js
NetMan 65754e6d19 Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
..
src Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
LICENSE Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
README.md Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
package.json Ran npm install for whole directory 2024-01-05 20:30:21 +01:00

README.md

npm version

ESLint JavaScript Plugin

Website | Configure ESLint | Rules | Contributing | Twitter | Chatroom

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

npm install @eslint/js -D

Usage

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

import js from "@eslint/js";

export default [

    // apply recommended rules to JS files
    {
        files: ["**/*.js"],
        rules: js.configs.recommended.rules
    },

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

    // apply all rules to JS files
    {
        files: ["**/*.js"],
        rules: {
            ...js.configs.all.rules,
            "no-unused-vars": "warn"
        } 
    }
]

License

MIT