forked from antfu/eslint-config
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: node rename chore: release v3.0.0-beta.15
- Loading branch information
Showing
114 changed files
with
2,268 additions
and
9,583 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1 @@ | ||
# @nivalis/eslint-config | ||
|
||
> ESLint | ||
> [shareable config](http://eslint.org/docs/developer-guide/shareable-configs.html) | ||
> flat config for nodejs, typescript, react, nextjs, tailwindcss, prettier... | ||
## Installation | ||
|
||
```bash | ||
npm i -D @nivalis/eslint-config | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
// eslint.config.js | ||
import { nivalis } from '@nivalis/eslint-config'; | ||
|
||
export default nivalis(); | ||
``` | ||
|
||
```jsonc | ||
// package.json | ||
{ | ||
// ... | ||
"type": "module" | ||
} | ||
``` | ||
|
||
### Custom Config | ||
|
||
```js | ||
import { nivalis } from '@nivalis/eslint-config'; | ||
import anotherConfig from 'another-config'; | ||
import anotherPlugin from 'another-plugin'; | ||
|
||
export default nivalis( | ||
{ | ||
gitignore: true, | ||
graphql: false, // true if graphql is installed | ||
nextjs: false, // true if nextjs is installed | ||
prettier: true, | ||
react: true, // true if react is installed | ||
sortKeys: false, // disabled by default | ||
stylistic: false, // disabled by default | ||
tailwindcss: true, // true if tailwindcss is installed | ||
typescript: true, // true if typescript is installed | ||
typescriptTypecheck: true, // true if typescript is installed | ||
}, | ||
[ | ||
/* ignore some files */ | ||
{ | ||
ignores: ['tsup.config.ts'], | ||
}, | ||
|
||
/* disable some rules */ | ||
{ | ||
rules: { | ||
'no-console': 'off', | ||
}, | ||
}, | ||
|
||
/* add another config */ | ||
anotherConfig, | ||
|
||
/* add another plugin */ | ||
{ | ||
plugins: [anotherPlugin], | ||
rules: { | ||
// custom rules... | ||
}, | ||
}, | ||
], | ||
); | ||
``` | ||
|
||
### VSCode | ||
|
||
```jsonc | ||
{ | ||
"eslint.experimental.useFlatConfig": true | ||
} | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,6 @@ | ||
// @ts-expect-error - This module has no types | ||
import styleMigrate from '@stylistic/eslint-plugin-migrate'; | ||
import nivalis from './src'; | ||
import { nivalis } from './src'; | ||
|
||
export default nivalis( | ||
{ | ||
react: true, | ||
svelte: true, | ||
solid: true, | ||
typescript: true, | ||
formatters: true, | ||
}, | ||
{ ignores: ['fixtures', '_fixtures'] }, | ||
{ | ||
files: ['src/**/*.ts'], | ||
rules: { | ||
'perfectionist/sort-objects': 'error', | ||
'ts/no-unsafe-assignment': 'off', | ||
'ts/no-explicit-any': 'off', | ||
}, | ||
}, | ||
{ | ||
files: ['src/configs/*.ts'], | ||
plugins: { | ||
// eslint-disable-next-line ts/no-unsafe-assignment | ||
'style-migrate': styleMigrate, | ||
}, | ||
rules: { | ||
'style-migrate/migrate': ['error', { namespaceTo: 'style' }], | ||
}, | ||
}, | ||
{ typescript: { configPath: './tsconfig.json' } }, | ||
{ ignores: ['src/typegen.d.ts'] }, | ||
); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.