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
-- Silent the stylistic rules in you IDE, but still auto fix them
240
+
rulesCustomizations=customizations,
241
+
},
242
+
}
243
+
)
244
+
```
245
+
246
+
### Neovim format on save
247
+
248
+
There's few ways you can achieve format on save in neovim:
249
+
250
+
-`nvim-lspconfig` has a `EslintFixAll` command predefined, you can create a autocmd to call this command after saving file.
251
+
252
+
```lua
253
+
lspconfig.eslint.setup({
254
+
--- ...
255
+
on_attach=function(client, bufnr)
256
+
vim.api.nvim_create_autocmd("BufWritePre", {
257
+
buffer=bufnr,
258
+
command="EslintFixAll",
259
+
})
260
+
end,
261
+
})
262
+
```
263
+
264
+
- Use [conform.nvim](https://github.com/stevearc/conform.nvim).
265
+
- Use [none-ls](https://github.com/nvimtools/none-ls.nvim)
266
+
- Use [nvim-lint](https://github.com/mfussenegger/nvim-lint)
267
+
268
+
</details>
269
+
180
270
## Customization
181
271
182
272
Since v1.0, we migrated to [ESLint Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new). It provides much better organization and composition.
@@ -197,6 +287,9 @@ And that's it! Or you can configure each integration individually, for example:
197
287
importkirklinfrom"@kirklin/eslint-config";
198
288
199
289
exportdefaultkirklin({
290
+
// Type of the project. 'lib' for libraries, the default is 'app'
291
+
type:"lib",
292
+
200
293
// Enable stylistic formatting rules
201
294
// stylistic: true,
202
295
@@ -206,7 +299,7 @@ export default kirklin({
206
299
quotes:"double", // or 'single'
207
300
},
208
301
209
-
// TypeScript and Vue are auto-detected, you can also explicitly enable them:
302
+
// TypeScript and Vue are autodetected, you can also explicitly enable them:
210
303
typescript:true,
211
304
vue:true,
212
305
@@ -309,7 +402,7 @@ Since flat config requires us to explicitly provide the plugin names (instead of
When you want to override rules, or disable them inline, you need to update to the new prefix:
@@ -329,7 +422,26 @@ type foo = { bar: 2 }
329
422
>
330
423
> Feel free to open issues if you want to combine this config with some other config presets but faced naming collisions. I am happy to figure out a way to make them work. But at this moment I have no plan to revert the renaming.
331
424
332
-
Since v2.9.0, this preset will automatically rename the plugins also for your custom configs. You can use the original prefix to override the rules directly.
425
+
Since v2.3.0, this preset will automatically rename the plugins also for your custom configs. You can use the original prefix to override the rules directly.
426
+
427
+
<details>
428
+
<summary>Change back to original prefix</summary>
429
+
430
+
If you really want to use the original prefix, you can revert the plugin renaming by:
0 commit comments