Skip to content

Commit

Permalink
chore: eslint v9
Browse files Browse the repository at this point in the history
fix: node rename

chore: release v3.0.0-beta.15
  • Loading branch information
pnodet committed Jul 19, 2024
1 parent 8cadcd4 commit c9d87bc
Show file tree
Hide file tree
Showing 114 changed files with 2,268 additions and 9,583 deletions.
71 changes: 0 additions & 71 deletions .github/workflows/ci.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/release.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .vscode/settings.json

This file was deleted.

82 changes: 0 additions & 82 deletions README.md
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
}
```
7 changes: 0 additions & 7 deletions eslint.config.js

This file was deleted.

32 changes: 3 additions & 29 deletions eslint.config.ts
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'] },
);
21 changes: 0 additions & 21 deletions fixtures/input/astro.astro

This file was deleted.

10 changes: 0 additions & 10 deletions fixtures/input/css.css

This file was deleted.

17 changes: 0 additions & 17 deletions fixtures/input/html.html

This file was deleted.

72 changes: 0 additions & 72 deletions fixtures/input/javascript.js

This file was deleted.

Loading

0 comments on commit c9d87bc

Please sign in to comment.