You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-57Lines changed: 27 additions & 57 deletions
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,6 @@ Official GoDaddy JavaScript styleguide. It includes `eslint` packages for variou
6
6
-[`eslint-config-godaddy-react`]: Configuration for ES6 React JavaScript applications
7
7
-[`eslint-config-godaddy-typescript`]: Configuration for ES6 TypeScript applications
8
8
-[`eslint-config-godaddy-react-typescript`]: Configuration for ES6 React JavaScript applications
9
-
-[`eslint-config-godaddy-flow`]: Configuration for ES6 React JavaScript applications using Flow
10
-
-[`eslint-config-godaddy-react-flow`]: Configuration for ES6 React JavaScript applications using Flow
11
9
12
10
There are many useful features:
13
11
@@ -43,44 +41,29 @@ npm i eslint-config-godaddy-typescript --save-dev
43
41
44
42
# OR (ES6 with React and TypeScript rules)
45
43
npm i eslint-config-godaddy-react-typescript --save-dev
46
-
47
-
# OR (ES6 with Flow rules)
48
-
npm i eslint-config-godaddy-flow --save-dev
49
-
50
-
# OR (ES6 with React and Flow rules)
51
-
npm i eslint-config-godaddy-react-flow --save-dev
52
44
```
53
45
54
46
## Usage
55
47
56
48
There are two ways to use this styleguide depending on your own tooling preference: directly using pre-included binaries or running `eslint` yourself with a custom `.eslintrc` config.
57
49
58
-
### 1. Use the pre-included binaries
59
-
60
-
These use _exactly_ the configuration defined in the individual `eslint-config-godaddy*` package **with auto-fix enabled automatically.**
The `--fix` option in `eslint` is [**only** available as a CLI option](https://github.com/eslint/eslint/issues/8041). Auto-fix will *NOT be enabled* unless you run `eslint --fix` in your `package.json`.
66
+
The `--fix` option in `eslint` is [**only** available as a CLI option](https://github.com/eslint/eslint/issues/8041). Auto-fix will **_NOT be enabled_** unless you run `eslint --fix` in your `package.json`.
84
67
85
68
```js
86
69
{
@@ -102,42 +85,32 @@ This section is a place for additional best practices that may be useful but are
102
85
103
86
## How do I override a specific rule ?
104
87
105
-
### 1. Add a `.eslintrc` file at the root of your project:
88
+
### 1. Add a `eslint.config.js|mjs` file at the root of your project
106
89
107
90
```js
108
-
{
109
-
"extends":"godaddy",
110
-
"rules": {
111
-
// Disable the 'max-params' rule
112
-
"max-params":0
113
-
}
114
-
}
115
-
```
116
-
117
-
### 2. Add a param to specify the path of your own `.eslintrc` file in your `package.json`
0 commit comments