Skip to content

Commit

Permalink
feat: migrate to flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
kelsos committed Jan 9, 2024
1 parent 0fd71b6 commit 6ac159a
Show file tree
Hide file tree
Showing 33 changed files with 2,333 additions and 986 deletions.
22 changes: 11 additions & 11 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
'config:recommended',
':dependencyDashboard',
':dependencyDashboardApproval',
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
":dependencyDashboard",
":dependencyDashboardApproval"
],
packageRules: [
"packageRules": [
{
allowedVersions: '/^(18)\\./',
groupName: 'Node.js',
matchPackageNames: ['@types/node', 'node'],
},
],
"allowedVersions": "/^(18)\\./",
"groupName": "Node.js",
"matchPackageNames": ["@types/node", "node"]
}
]
}
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ A common configuration to be used across the different [rotki](https://github.co
pnpm add -D eslint @rotki/eslint-config
```


### Config `.eslintrc`

```json
Expand All @@ -36,19 +35,18 @@ For example:
}
```


### TypeScript Aware Rules

Type aware rules are enabled when a `tsconfig.eslint.json` is found in the project root, which will introduce some stricter rules into your project. If you want to enable it while have no `tsconfig.eslint.json` in the project root, you can change tsconfig name by modifying `ESLINT_TSCONFIG` env.

```js
// .eslintrc.js
process.env.ESLINT_TSCONFIG = 'tsconfig.json'
process.env.ESLINT_TSCONFIG = 'tsconfig.json';
module.exports = {
extends: '@rotki'
}
};
```

## License

[AGPL-3.0](./LICENSE) License © 2023- [Rotki Solutions GmbH](https://github.com/rotki)
[AGPL-3.0](./LICENSE) License © 2023- [Rotki Solutions GmbH](https://github.com/rotki)
6 changes: 5 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { rotki } from './dist/index.js';

export default rotki();
export default rotki({
vue: true,
typescript: true,
formatters: true,
});
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,34 +38,44 @@
"eslint": ">=8.0.0"
},
"dependencies": {
"@antfu/install-pkg": "0.3.1",
"@stylistic/eslint-plugin": "1.5.3",
"@typescript-eslint/eslint-plugin": "6.18.0",
"@typescript-eslint/parser": "6.18.0",
"eslint-config-flat-gitignore": "0.1.2",
"eslint-config-prettier": "9.1.0",
"eslint-define-config": "2.1.0",
"eslint-merge-processors": "0.1.0",
"eslint-plugin-antfu": "2.1.1",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-format": "0.1.0",
"eslint-plugin-html": "7.1.0",
"eslint-plugin-i": "2.29.1",
"eslint-plugin-jsonc": "2.11.2",
"eslint-plugin-markdown": "3.0.1",
"eslint-plugin-n": "16.6.2",
"eslint-plugin-perfectionist": "2.5.0",
"eslint-plugin-prettier": "5.1.2",
"eslint-plugin-sort-keys": "2.3.5",
"eslint-plugin-unicorn": "50.0.1",
"eslint-plugin-unused-imports": "3.0.0",
"eslint-plugin-vue": "9.19.2",
"eslint-plugin-yml": "1.11.0",
"eslint-processor-vue-blocks": "0.1.1",
"globals": "13.24.0",
"jsonc-eslint-parser": "2.4.0",
"local-pkg": "0.5.0",
"prettier": "3.1.1",
"prompts": "2.4.2",
"vue-eslint-parser": "9.4.0",
"yaml-eslint-parser": "1.2.2"
},
"devDependencies": {
"@commitlint/cli": "18.4.4",
"@commitlint/config-conventional": "18.4.4",
"@rotki/eslint-config": "*",
"@types/eslint": "8.56.1",
"@types/node": "20.10.7",
"@types/prompts": "2.4.9",
"bumpp": "9.2.1",
"eslint": "8.56.0",
"eslint-flat-config-viewer": "0.1.8",
Expand Down
Loading

0 comments on commit 6ac159a

Please sign in to comment.