mirror of
https://github.com/diced/zipline.git
synced 2025-12-05 20:40:12 -08:00
chore: update ESLint config (#826)
* chore: update ESLint config * chore: update file permissions --------- Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
This commit is contained in:
1
.prettierignore
Executable file
1
.prettierignore
Executable file
@@ -0,0 +1 @@
|
|||||||
|
pnpm-lock.yaml
|
||||||
@@ -1,44 +1,70 @@
|
|||||||
// TODO: migrate everything to use eslint 9 features instead of compatibility layers
|
|
||||||
|
|
||||||
import unusedImports from 'eslint-plugin-unused-imports';
|
import unusedImports from 'eslint-plugin-unused-imports';
|
||||||
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
import tseslint from 'typescript-eslint';
|
||||||
import tsParser from '@typescript-eslint/parser';
|
import prettier from 'eslint-plugin-prettier';
|
||||||
|
import prettierConfig from 'eslint-config-prettier';
|
||||||
|
import nextConfig from '@next/eslint-plugin-next';
|
||||||
|
import reactHooksPlugin from 'eslint-plugin-react-hooks';
|
||||||
|
import reactPlugin from 'eslint-plugin-react';
|
||||||
|
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import { fileURLToPath } from 'node:url';
|
import { fileURLToPath } from 'node:url';
|
||||||
import js from '@eslint/js';
|
import fs from 'node:fs';
|
||||||
import { FlatCompat } from '@eslint/eslintrc';
|
|
||||||
import { includeIgnoreFile } from '@eslint/compat';
|
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
const __dirname = path.dirname(__filename);
|
const __dirname = path.dirname(__filename);
|
||||||
const compat = new FlatCompat({
|
|
||||||
baseDirectory: __dirname,
|
|
||||||
recommendedConfig: js.configs.recommended,
|
|
||||||
allConfig: js.configs.all,
|
|
||||||
});
|
|
||||||
|
|
||||||
const gitignorePath = path.resolve(__dirname, '.gitignore');
|
const gitignorePath = path.resolve(__dirname, '.gitignore');
|
||||||
|
const gitignoreContent = fs.readFileSync(gitignorePath, 'utf8');
|
||||||
|
const gitignorePatterns = gitignoreContent
|
||||||
|
.split('\n')
|
||||||
|
.filter((line) => line.trim() && !line.startsWith('#'))
|
||||||
|
.map((pattern) => pattern.trim());
|
||||||
|
|
||||||
|
export default tseslint.config(
|
||||||
|
{ ignores: gitignorePatterns },
|
||||||
|
|
||||||
|
...tseslint.configs.recommended,
|
||||||
|
|
||||||
export default [
|
|
||||||
includeIgnoreFile(gitignorePath),
|
|
||||||
...compat.extends(
|
|
||||||
'next/core-web-vitals',
|
|
||||||
'plugin:prettier/recommended',
|
|
||||||
'plugin:@typescript-eslint/recommended',
|
|
||||||
),
|
|
||||||
{
|
{
|
||||||
|
files: ['**/*.{js,mjs,cjs,ts,tsx}'],
|
||||||
|
languageOptions: {
|
||||||
|
ecmaVersion: 'latest',
|
||||||
|
sourceType: 'module',
|
||||||
|
parserOptions: {
|
||||||
|
ecmaFeatures: {
|
||||||
|
jsx: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
'unused-imports': unusedImports,
|
'unused-imports': unusedImports,
|
||||||
'@typescript-eslint': typescriptEslint,
|
prettier: prettier,
|
||||||
|
'@next/next': nextConfig,
|
||||||
|
'react-hooks': reactHooksPlugin,
|
||||||
|
react: reactPlugin,
|
||||||
|
'jsx-a11y': jsxA11yPlugin,
|
||||||
},
|
},
|
||||||
|
|
||||||
languageOptions: {
|
|
||||||
parser: tsParser,
|
|
||||||
},
|
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
'linebreak-style': ['error', 'unix'],
|
...reactPlugin.configs.recommended.rules,
|
||||||
|
|
||||||
|
...reactHooksPlugin.configs.recommended.rules,
|
||||||
|
|
||||||
|
...nextConfig.configs.recommended.rules,
|
||||||
|
...nextConfig.configs['core-web-vitals'].rules,
|
||||||
|
|
||||||
|
...prettierConfig.rules,
|
||||||
|
'prettier/prettier': [
|
||||||
|
'error',
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
fileInfoOptions: {
|
||||||
|
withNodeModules: false,
|
||||||
|
},
|
||||||
|
ignoreFileExtensions: ['pnpm-lock.yaml'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
'linebreak-style': ['error', 'unix'],
|
||||||
quotes: [
|
quotes: [
|
||||||
'error',
|
'error',
|
||||||
'single',
|
'single',
|
||||||
@@ -46,7 +72,6 @@ export default [
|
|||||||
avoidEscape: true,
|
avoidEscape: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
semi: ['error', 'always'],
|
semi: ['error', 'always'],
|
||||||
'jsx-quotes': ['error', 'prefer-single'],
|
'jsx-quotes': ['error', 'prefer-single'],
|
||||||
indent: 'off',
|
indent: 'off',
|
||||||
@@ -77,10 +102,17 @@ export default [
|
|||||||
argsIgnorePattern: '^_',
|
argsIgnorePattern: '^_',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
'@typescript-eslint/ban-ts-comment': 'off',
|
'@typescript-eslint/ban-ts-comment': 'off',
|
||||||
'@typescript-eslint/no-explicit-any': 'off',
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
'@typescript-eslint/no-unused-expressions': 'off',
|
'@typescript-eslint/no-unused-expressions': 'off',
|
||||||
},
|
},
|
||||||
|
settings: {
|
||||||
|
react: {
|
||||||
|
version: 'detect',
|
||||||
},
|
},
|
||||||
];
|
next: {
|
||||||
|
rootDir: __dirname,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|||||||
68
package.json
68
package.json
@@ -26,8 +26,8 @@
|
|||||||
"docker:compose:dev:logs": "docker-compose --file docker-compose.dev.yml logs -f"
|
"docker:compose:dev:logs": "docker-compose --file docker-compose.dev.yml logs -f"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "3.726.1",
|
"@aws-sdk/client-s3": "3.832.0",
|
||||||
"@aws-sdk/lib-storage": "3.726.1",
|
"@aws-sdk/lib-storage": "3.832.0",
|
||||||
"@fastify/cookie": "^11.0.2",
|
"@fastify/cookie": "^11.0.2",
|
||||||
"@fastify/cors": "^11.0.1",
|
"@fastify/cors": "^11.0.1",
|
||||||
"@fastify/multipart": "^9.0.3",
|
"@fastify/multipart": "^9.0.3",
|
||||||
@@ -35,18 +35,18 @@
|
|||||||
"@fastify/sensible": "^6.0.3",
|
"@fastify/sensible": "^6.0.3",
|
||||||
"@fastify/static": "^8.2.0",
|
"@fastify/static": "^8.2.0",
|
||||||
"@github/webauthn-json": "^2.1.1",
|
"@github/webauthn-json": "^2.1.1",
|
||||||
"@mantine/charts": "^8.0.2",
|
"@mantine/charts": "^8.1.1",
|
||||||
"@mantine/code-highlight": "^8.0.2",
|
"@mantine/code-highlight": "^8.1.1",
|
||||||
"@mantine/core": "^8.0.2",
|
"@mantine/core": "^8.1.1",
|
||||||
"@mantine/dates": "^8.0.2",
|
"@mantine/dates": "^8.1.1",
|
||||||
"@mantine/dropzone": "^8.0.2",
|
"@mantine/dropzone": "^8.1.1",
|
||||||
"@mantine/form": "^8.0.2",
|
"@mantine/form": "^8.1.1",
|
||||||
"@mantine/hooks": "^8.0.2",
|
"@mantine/hooks": "^8.1.1",
|
||||||
"@mantine/modals": "^8.0.2",
|
"@mantine/modals": "^8.1.1",
|
||||||
"@mantine/notifications": "^8.0.2",
|
"@mantine/notifications": "^8.1.1",
|
||||||
"@prisma/client": "^6.9.0",
|
"@prisma/client": "^6.10.1",
|
||||||
"@prisma/internals": "^6.9.0",
|
"@prisma/internals": "^6.10.1",
|
||||||
"@prisma/migrate": "^6.9.0",
|
"@prisma/migrate": "^6.10.1",
|
||||||
"@smithy/node-http-handler": "^4.0.6",
|
"@smithy/node-http-handler": "^4.0.6",
|
||||||
"@tabler/icons-react": "^3.34.0",
|
"@tabler/icons-react": "^3.34.0",
|
||||||
"argon2": "^0.43.0",
|
"argon2": "^0.43.0",
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
"dotenv": "^16.5.0",
|
"dotenv": "^16.5.0",
|
||||||
"fast-glob": "^3.3.3",
|
"fast-glob": "^3.3.3",
|
||||||
"fastify": "^5.3.3",
|
"fastify": "^5.4.0",
|
||||||
"fastify-plugin": "^5.0.1",
|
"fastify-plugin": "^5.0.1",
|
||||||
"fflate": "^0.8.2",
|
"fflate": "^0.8.2",
|
||||||
"fluent-ffmpeg": "^2.1.3",
|
"fluent-ffmpeg": "^2.1.3",
|
||||||
@@ -66,13 +66,13 @@
|
|||||||
"iron-session": "^8.0.4",
|
"iron-session": "^8.0.4",
|
||||||
"isomorphic-dompurify": "^2.25.0",
|
"isomorphic-dompurify": "^2.25.0",
|
||||||
"katex": "^0.16.22",
|
"katex": "^0.16.22",
|
||||||
"mantine-datatable": "^7.17.1",
|
"mantine-datatable": "^8.1.1",
|
||||||
"ms": "^2.1.3",
|
"ms": "^2.1.3",
|
||||||
"multer": "2.0.1",
|
"multer": "2.0.1",
|
||||||
"next": "^15.3.3",
|
"next": "^15.3.4",
|
||||||
"nuqs": "^2.4.3",
|
"nuqs": "^2.4.3",
|
||||||
"otplib": "^12.0.1",
|
"otplib": "^12.0.1",
|
||||||
"prisma": "^6.9.0",
|
"prisma": "^6.10.1",
|
||||||
"qrcode": "^1.5.4",
|
"qrcode": "^1.5.4",
|
||||||
"react": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.0",
|
||||||
@@ -80,41 +80,41 @@
|
|||||||
"remark-gfm": "^4.0.1",
|
"remark-gfm": "^4.0.1",
|
||||||
"sharp": "^0.34.2",
|
"sharp": "^0.34.2",
|
||||||
"swr": "^2.3.3",
|
"swr": "^2.3.3",
|
||||||
"zod": "^3.25.51",
|
"typescript-eslint": "^8.34.1",
|
||||||
|
"zod": "^3.25.67",
|
||||||
"zustand": "^5.0.5"
|
"zustand": "^5.0.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/compat": "^1.2.9",
|
"@next/eslint-plugin-next": "^15.3.4",
|
||||||
"@eslint/eslintrc": "^3.3.1",
|
|
||||||
"@eslint/js": "^9.28.0",
|
|
||||||
"@types/bytes": "^3.1.5",
|
"@types/bytes": "^3.1.5",
|
||||||
"@types/fluent-ffmpeg": "^2.1.27",
|
"@types/fluent-ffmpeg": "^2.1.27",
|
||||||
"@types/katex": "^0.16.7",
|
"@types/katex": "^0.16.7",
|
||||||
"@types/ms": "^2.1.0",
|
"@types/ms": "^2.1.0",
|
||||||
"@types/multer": "^1.4.12",
|
"@types/multer": "^1.4.13",
|
||||||
"@types/node": "^22.15.30",
|
"@types/node": "^24.0.3",
|
||||||
"@types/qrcode": "^1.5.5",
|
"@types/qrcode": "^1.5.5",
|
||||||
"@types/react": "^19.1.6",
|
"@types/react": "^19.1.8",
|
||||||
"@types/react-dom": "^19.1.6",
|
"@types/react-dom": "^19.1.6",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.33.1",
|
"eslint": "^9.29.0",
|
||||||
"@typescript-eslint/parser": "^8.33.1",
|
"eslint-config-next": "^15.3.4",
|
||||||
"eslint": "^9.28.0",
|
|
||||||
"eslint-config-next": "^15.3.3",
|
|
||||||
"eslint-config-prettier": "^10.1.5",
|
"eslint-config-prettier": "^10.1.5",
|
||||||
"eslint-plugin-prettier": "^5.4.1",
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
||||||
|
"eslint-plugin-prettier": "^5.5.0",
|
||||||
|
"eslint-plugin-react": "^7.37.5",
|
||||||
|
"eslint-plugin-react-hooks": "^5.2.0",
|
||||||
"eslint-plugin-unused-imports": "^4.1.4",
|
"eslint-plugin-unused-imports": "^4.1.4",
|
||||||
"postcss": "^8.5.4",
|
"postcss": "^8.5.6",
|
||||||
"postcss-preset-mantine": "^1.17.0",
|
"postcss-preset-mantine": "^1.17.0",
|
||||||
"postcss-simple-vars": "^7.0.1",
|
"postcss-simple-vars": "^7.0.1",
|
||||||
"prettier": "^3.5.3",
|
"prettier": "^3.5.3",
|
||||||
"sass": "^1.89.1",
|
"sass": "^1.89.2",
|
||||||
"tsc-alias": "^1.8.16",
|
"tsc-alias": "^1.8.16",
|
||||||
"tsup": "^8.5.0",
|
"tsup": "^8.5.0",
|
||||||
"tsx": "^4.19.4",
|
"tsx": "^4.20.3",
|
||||||
"typescript": "^5.8.3"
|
"typescript": "^5.8.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=22"
|
"node": ">=22"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.10.0+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39"
|
"packageManager": "pnpm@10.12.1"
|
||||||
}
|
}
|
||||||
|
|||||||
3551
pnpm-lock.yaml
generated
3551
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -4,8 +4,8 @@ import { validateConfigObject, Config } from './validate';
|
|||||||
let config: Config;
|
let config: Config;
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
/* eslint-disable-line no-var */ var __config__: Config;
|
var __config__: Config;
|
||||||
/* eslint-disable-line no-var */ var __tamperedConfig__: string[];
|
var __tamperedConfig__: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const reloadSettings = async () => {
|
const reloadSettings = async () => {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { S3Datasource } from './S3';
|
|||||||
let datasource: Datasource;
|
let datasource: Datasource;
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
// eslint-disable-next-line no-var
|
|
||||||
var __datasource__: Datasource;
|
var __datasource__: Datasource;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ const building = !!process.env.ZIPLINE_BUILD;
|
|||||||
let prisma: ExtendedPrismaClient;
|
let prisma: ExtendedPrismaClient;
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
// eslint-disable-next-line no-var
|
|
||||||
var __db__: ExtendedPrismaClient;
|
var __db__: ExtendedPrismaClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./src/*", "./generated/*"],
|
"@/*": ["./src/*", "./generated/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "src/client/mount.js"],
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "src/client/mount.js"],
|
||||||
|
|||||||
Reference in New Issue
Block a user