Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: update dependencies #6

Merged
merged 4 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/young-walls-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tabula/eslint-config': patch
---

update dependencies and `README.md`
54 changes: 20 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,50 +37,36 @@ You can use [npm](https://npmjs.com) or [yarn](https://yarnpkg.com) too.

## Usage

The package provides `browser` and `node` presets. Add an `.eslintrc.json` configuration file to the root of your
project for browser:
The package provides utilities to build flat config, also configs and presets, which can be used for build your own
configuration.

```json
{
"extends": "@tabula/eslint-config/browser",
The `defineConfig` utility accepts record with config definitions. Each definition is a ESLint flat config itself, or
object with `files`, `ignores` and `configs` fields.

"parserOptions": {
"project": ["tsconfig.json"]
}
}
```
It's function build flat config with defined names to improve debug and readability.

or for browser tests:
```js
import { defineConfig } from '@tabula/eslint-config';

```json
{
"extends": "@tabula/eslint-config/browser-tests",

"parserOptions": {
"project": ["tsconfig.json"]
}
}
```
export default defineConfig({
typescript: {
files: ['{src,stories}/**/*.{ts,tsx}'],
ignores: ['src/**/*.js'],

or for Node.js:
configs: presets.typescript(),
},

```json
{
"extends": "@tabula/eslint-config/node",
stories: {
files: ['stories/**/*.{ts,tsx}'],

"parserOptions": {
"project": ["tsconfig.json"]
rules: {
'react/no-multi-comp': 'off',
},
}
}
});
```

### Parser Options

Pay attention to the `parserOptions.project` option.

We use rules which require type checking. The parser must be configured properly for them.

See more information about `parserOptions.project` [here](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/parser#parseroptionsproject).
Also package exports `configs` and `presets` objects, which provide of single configs or configs list.

## License

Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@
"pnpm": "^9"
},
"dependencies": {
"@eslint/compat": "^1.2.2",
"@eslint/js": "^9.13.0",
"@vitest/eslint-plugin": "^1.1.7",
"@eslint/compat": "^1.2.3",
"@eslint/js": "^9.15.0",
"@vitest/eslint-plugin": "^1.1.10",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import-x": "^4.3.1",
"eslint-plugin-import-x": "^4.4.2",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-testing-library": "^6.4.0",
"eslint-plugin-unicorn": "^56.0.0",
"globals": "^15.11.0",
"globals": "^15.12.0",
"kebab-case": "^2.0.1",
"typescript-eslint": "^8.12.1"
"typescript-eslint": "^8.14.0"
},
"peerDependencies": {
"eslint": "^9.12.0",
Expand All @@ -73,8 +73,8 @@
"@types/eslint-config-prettier": "^6.11.3",
"@types/eslint-plugin-jsx-a11y": "^6.9.0",
"@types/eslint__js": "^8.42.3",
"eslint": "^9.13.0",
"lefthook": "^1.8.1",
"eslint": "^9.15.0",
"lefthook": "^1.8.4",
"prettier": "^3.3.3",
"typescript": "^5.6.3"
},
Expand Down
Loading