Skip to content

Commit

Permalink
fix: make sure that rule level is string
Browse files Browse the repository at this point in the history
Changes the level to as const to avoid issues integrating
with the eslint-config
  • Loading branch information
kelsos committed Jan 11, 2024
1 parent c1d90d7 commit aef4c24
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
20 changes: 10 additions & 10 deletions docs/rules/no-deprecated-classes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: '@rotki/no-deprecated-classes'
description: disallow the usage of vuetify css classes since they are replaced with tailwindcss
since: 0.1.0
since: 0.0.1
---

# @rotki/no-deprecated-classes
Expand All @@ -19,22 +19,22 @@ 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 All @@ -49,7 +49,7 @@ This rule reports usages of deprecated css classes in the code.

## :rocket: Version

This rule was introduced in @rotki/eslint-plugin v0.1.0
This rule was introduced in @rotki/eslint-plugin v0.0.1

## :mag: Implementation

Expand Down
4 changes: 2 additions & 2 deletions scripts/update-recommended-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function main() {
export = {
extends: [require.resolve('./base')],
parserOptions: {
ecmaVersion: 2018,
ecmaVersion: 2022,
sourceType: 'module',
ecmaFeatures: {
jsx: true
Expand All @@ -30,7 +30,7 @@ export = {
rules: {
${rules
.filter((rule) => rule.recommended)
.map((rule) => `'${rule.id}': 'warn',`)
.map((rule) => `'${rule.id}': 'warn' as const,`)
.join('\n ')}
},
}`,
Expand Down
4 changes: 2 additions & 2 deletions src/configs/recommended.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
export = {
extends: [require.resolve('./base')],
parserOptions: {
ecmaVersion: 2018,
ecmaVersion: 2022,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
Expand All @@ -13,6 +13,6 @@ export = {
es6: true,
},
rules: {
'@rotki/no-deprecated-classes': 'warn',
'@rotki/no-deprecated-classes': 'warn' as const,
},
};

0 comments on commit aef4c24

Please sign in to comment.