.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / @eslint / eslintrc / README.md
1 # ESLintRC Library
2
3 This repository contains the legacy ESLintRC configuration file format for ESLint.
4
5 **Note:** This package is not intended for use outside of the ESLint ecosystem. It is ESLint-specific and not intended for use in other programs.
6
7 ## Installation
8
9 You can install the package as follows:
10
11 ```
12 npm install @eslint/eslintrc --save-dev
13
14 # or
15
16 yarn add @eslint/eslintrc -D
17 ```
18
19 ## Future Usage
20
21 **Note:** This package is not intended for public use at this time. The following is an example of how it will be used in the future.
22
23 The primary class in this package is `FlatCompat`, which is a utility to translate ESLintRC-style configs into flat configs. Here's how you use it inside of your `eslint.config.js` file:
24
25 ```js
26 import { FlatCompat } from "@eslint/eslintrc";
27
28 const compat = new FlatCompat();
29
30 export default [
31
32     // mimic ESLintRC-style extends
33     compat.extends("standard", "example"),
34
35     // mimic environments
36     compat.env({
37         es2020: true,
38         node: true
39     }),
40
41     // mimic plugins
42     compat.plugins("airbnb", "react"),
43
44     // translate an entire config
45     compat.config({
46         plugins: ["airbnb", "react"],
47         extends: "standard",
48         env: {
49             es2020: true,
50             node: true
51         },
52         rules: {
53             semi: "error"
54         }
55     })
56 ];
57 ```
58
59 ## License
60
61 MIT License