mirror of
https://github.com/modrinth/code.git
synced 2026-08-30 19:46:33 +00:00
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 cb99d2376c.
* feat: revert last rs
This commit is contained in:
@@ -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/'],
|
||||
},
|
||||
)
|
||||
@@ -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',
|
||||
},
|
||||
},
|
||||
]
|
||||
@@ -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