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
+1-36Lines changed: 1 addition & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,46 +125,11 @@ For the list of every available exclusion rule set, please see the [readme of es
125
125
}]
126
126
```
127
127
128
-
NB: This option will merge and override any config set with `.prettierrc` files (for Prettier < 1.7.0, [config files are ignored](https://github.com/prettier/eslint-plugin-prettier/issues/46))
128
+
NB: This option will merge and override any config set with `.prettierrc` files
129
129
130
130
- The second option:
131
131
132
-
- A string with a pragma that triggers this rule. By default, this rule applies to all files. However, if you set a pragma (this option), only files with that pragma in the heading docblock will be checked. All pragmas must start with `@`. Example:
133
-
134
-
```json
135
-
"prettier/prettier": ["error", null, "@prettier"]
136
-
```
137
-
138
-
Only files with `@prettier`in the heading docblock will be checked:
139
-
140
-
```js
141
-
/** @prettier */
142
-
143
-
console.log(1 + 2 + 3);
144
-
```
145
-
146
-
Or:
147
-
148
-
```js
149
-
/**
150
-
* @prettier
151
-
*/
152
-
153
-
console.log(4 + 5 + 6);
154
-
```
155
-
156
-
_This option is useful if you're migrating a large codebase and already use pragmas like `@flow`._
157
-
158
132
- An object with the following options
159
-
160
-
- `pragma`: Also sets the aforementioned `pragma`: a string with a pragma that triggers this rule. By default, this rule applies to all files. However, if you set a pragma (this option), only files with that pragma in the heading docblock will be checked. All pragmas must start with `@`.
161
-
162
-
```json
163
-
"prettier/prettier": ["error", null, {
164
-
"pragma": "@prettier"
165
-
}]
166
-
```
167
-
168
133
- `usePrettierrc`: Enables loading of the Prettier configuration file, (default: `true`). May be useful if you are using multiple tools that conflict with each other, or do not wish to mix your ESLint settings with your Prettier configuration.
0 commit comments