You've already forked AstralRinth
forked from didirus/AstralRinth
refactor: migrate to common eslint+prettier configs (#4168)
* refactor: migrate to common eslint+prettier configs * fix: prettier frontend * feat: config changes * fix: lint issues * fix: lint * fix: type imports * fix: cyclical import issue * fix: lockfile * fix: missing dep * fix: switch to tabs * fix: continue switch to tabs * fix: rustfmt parity * fix: moderation lint issue * fix: lint issues * fix: ui intl * fix: lint issues * Revert "fix: rustfmt parity" This reverts commit cb99d2376c321d813d4b7fc7e2a213bb30a54711. * feat: revert last rs
This commit is contained in:
20
packages/tooling-config/eslint/base.mjs
Normal file
20
packages/tooling-config/eslint/base.mjs
Normal file
@@ -0,0 +1,20 @@
|
||||
import eslint from '@eslint/js'
|
||||
import prettierEslint from 'eslint-plugin-prettier/recommended'
|
||||
import tseslint from 'typescript-eslint'
|
||||
|
||||
export default tseslint.config(
|
||||
eslint.configs.recommended,
|
||||
tseslint.configs.recommendedTypeChecked,
|
||||
prettierEslint,
|
||||
...common,
|
||||
{
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
warnOnUnsupportedTypeScriptVersion: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ignores: ['node_modules/', 'dist/', 'build/'],
|
||||
},
|
||||
)
|
||||
20
packages/tooling-config/eslint/common.mjs
Normal file
20
packages/tooling-config/eslint/common.mjs
Normal file
@@ -0,0 +1,20 @@
|
||||
import simpleImportSort from 'eslint-plugin-simple-import-sort'
|
||||
|
||||
export default [
|
||||
{
|
||||
plugins: {
|
||||
'simple-import-sort': simpleImportSort,
|
||||
},
|
||||
rules: {
|
||||
'simple-import-sort/imports': 'error',
|
||||
'simple-import-sort/exports': 'error',
|
||||
},
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
'@typescript-eslint/no-type-alias': 'off',
|
||||
'@typescript-eslint/ban-ts-comment': 'off',
|
||||
'@typescript-eslint/prefer-literal-enum-member': 'off',
|
||||
},
|
||||
},
|
||||
]
|
||||
31
packages/tooling-config/eslint/nuxt.mjs
Normal file
31
packages/tooling-config/eslint/nuxt.mjs
Normal file
@@ -0,0 +1,31 @@
|
||||
import { fixupPluginRules } from '@eslint/compat'
|
||||
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'
|
||||
import turboPlugin from 'eslint-plugin-turbo'
|
||||
import common from './common.mjs'
|
||||
|
||||
export const configurationNuxtToAppend = [
|
||||
...common,
|
||||
{
|
||||
name: 'turbo',
|
||||
plugins: {
|
||||
turbo: fixupPluginRules(turboPlugin),
|
||||
},
|
||||
rules: {
|
||||
'turbo/no-undeclared-env-vars': 'error',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'modrinth',
|
||||
rules: {
|
||||
'vue/html-self-closing': 'off',
|
||||
'vue/multi-word-component-names': 'off',
|
||||
},
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
warnOnUnsupportedTypeScriptVersion: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
export default createConfigForNuxt().append(configurationNuxtToAppend)
|
||||
Reference in New Issue
Block a user