Skip to content

Commit

Permalink
chore: update eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
kelsos committed Jan 16, 2024
1 parent 63be1f6 commit 9f06ca2
Show file tree
Hide file tree
Showing 29 changed files with 771 additions and 1,113 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

5 changes: 0 additions & 5 deletions .eslintrc.cjs

This file was deleted.

2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ expected behaviour. -->
### Addition information

<!-- Provide any additional information related to your issue -->


2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Closes #(issue_number)
Closes #(issue_number)
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"]
}
]
}
File renamed without changes.
4 changes: 0 additions & 4 deletions .prettierrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ See [here](https://rotki.github.io/eslint-plugin)

## License

[AGPL-3.0](./LICENSE) License &copy; 2023- [Rotki Solutions GmbH](https://github.com/rotki)
[AGPL-3.0](./LICENSE) License &copy; 2023- [Rotki Solutions GmbH](https://github.com/rotki)
2 changes: 1 addition & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default defineConfig({
...withCategories.map(({ category, rules }) => ({
text: `Rules in ${category}`,
collapsed: false,
items: rules.map((rule) => ({
items: rules.map(rule => ({
text: rule.name,
link: `/rules/${rule.name}`,
})),
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ hero:
link: /intro
- theme: alt
text: Get started
link: /started
link: /started
2 changes: 1 addition & 1 deletion docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

@rotki/eslint-plugin is an ESLint plugin for `@rotki/ui-library` and rotki.

[Get Started](./started.md)
[Get Started](./started.md)
32 changes: 24 additions & 8 deletions docs/rules/no-deprecated-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,38 @@ This rule reports usages of deprecated css classes in the code.

```vue
<!-- ✓ GOOD -->
<template><div class="flex flex-col" /></template>
<template>
<div class="flex flex-col" />
</template>
<template><div class="block" /></template>
<template>
<div class="block" />
</template>
<template><div class="grow" /></template>
<template>
<div class="grow" />
</template>
<template><div class="justify-between" /></template>
<template>
<div class="justify-between" />
</template>
<!-- ✗ BAD -->
<template><div class="d-flex flex-column" /></template>
<template>
<div class="d-flex flex-column" />
</template>
<template><div class="d-block" /></template>
<template>
<div class="d-block" />
</template>
<template><div class="grow" /></template>
<template>
<div class="grow" />
</template>
<template><div class="justify-space-between" /></template>
<template>
<div class="justify-space-between" />
</template>
```

</eslint-code-block>
Expand Down
2 changes: 1 addition & 1 deletion docs/started.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ module.export = {
'plugin:@rotki/recommended'
],
}
```
```
31 changes: 31 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const rotki = require('@rotki/eslint-config').default;

module.exports = rotki({
typescript: {
tsconfigPath: 'tsconfig.json',
},
stylistic: true,
}, {
files: ['src/**/*.ts'],
rules: {
'perfectionist/sort-objects': 'error',
'no-restricted-syntax': [
'error',
'DebuggerStatement',
'LabeledStatement',
'WithStatement',
'TSEnumDeclaration[const=true]',
],
},
}, {
files: ['scripts/**/*.ts'],
rules: {
'@typescript-eslint/no-floating-promises': 'off',
'unicorn/prefer-top-level-await': 'off',
},
}, {
files: ['**/.vitepress/config.mts'],
rules: {
'import/no-default-export': 'off',
},
});
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@
"eslint": "^8.0.0"
},
"dependencies": {
"@typescript-eslint/utils": "6.18.1",
"@typescript-eslint/utils": "6.19.0",
"jsonc-eslint-parser": "2.4.0",
"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": "1.1.2",
"@types/eslint": "8.56.1",
"@types/node": "18",
"@typescript-eslint/eslint-plugin": "6.18.1",
"@typescript-eslint/parser": "6.18.1",
"@typescript-eslint/rule-tester": "6.18.1",
"@rotki/eslint-config": "2.2.0",
"@types/eslint": "8.56.2",
"@types/node": "20",
"@typescript-eslint/eslint-plugin": "6.19.0",
"@typescript-eslint/parser": "6.19.0",
"@typescript-eslint/rule-tester": "6.19.0",
"bumpp": "9.2.1",
"eslint": "8.56.0",
"husky": "8.0.3",
Expand All @@ -61,7 +61,7 @@
"rimraf": "5.0.5",
"ts-node": "10.9.2",
"typescript": "5.3.3",
"vitepress": "1.0.0-rc.36"
"vitepress": "1.0.0-rc.39"
},
"engines": {
"node": ">=18.0.0",
Expand Down
Loading

0 comments on commit 9f06ca2

Please sign in to comment.