Skip to content

Commit

Permalink
feat: provides a preset for TypeScript projects
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The configuration files have been moved to the `rules` with some changes.
  • Loading branch information
tksst committed Jan 26, 2023
1 parent f8e2afb commit e362c56
Show file tree
Hide file tree
Showing 7 changed files with 169 additions and 2,153 deletions.
44 changes: 2 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,7 @@ $ npm install --save-dev @tksst/eslint-config
Example `eslint.config.js`:

```javascript
import globals from "globals";
import { preset } from "@tksst/eslint-config";

import eslintConfig from "@tksst/eslint-config";

export default [
{
ignores: ["dist/**"]
},
{
languageOptions: {
globals: {
// If your code runs on Node.js
...globals.node
}
}
},
{
files: ["**/*.test.js"],
languageOptions: {
globals: {
// If your test runs on Jest
...globals.jest
}
}
},
...eslintConfig
];
export default preset.typeScript({ jsIsCjs: true });
```

# Shareable Configurations

This package provies three configurations:

## `default`

This is based on `javaScript`, and `typeScript` is applied depending on the extension of the source code.

## `javaScript`

This is for JavaScript source code. I recommend using this if your project is JavaScript only.

## `typeScript`

This is based on `javaScript` with additional settings for TypeScript source code.
Loading

0 comments on commit e362c56

Please sign in to comment.