Skip to content

Commit

Permalink
add strict lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyu1818 committed Jun 10, 2024
1 parent dc19539 commit a005891
Show file tree
Hide file tree
Showing 55 changed files with 1,386 additions and 446 deletions.
52 changes: 0 additions & 52 deletions .eslintrc.json

This file was deleted.

11 changes: 11 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from '@zhangyu1818/eslint-config'

export default defineConfig({
presets: {
javascript: {
'no-undef': 'off',
},
prettier: true,
tailwindcss: true,
},
})
14 changes: 7 additions & 7 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import optimizeLocales from '@react-aria/optimize-locales-plugin'
import withBundleAnalyzer from '@next/bundle-analyzer'
import optimizeLocales from '@react-aria/optimize-locales-plugin'

/** @type {import('next').NextConfig} */
// eslint-disable-next-line import/no-mutable-exports
let nextConfig = {
output: 'export',
images: {
unoptimized: true,
},
reactStrictMode: true,
experimental: {
serverComponentsExternalPackages: [
'rsc-mdx',
'@shikijs/twoslash',
'@shikijs/rehype',
],
},
images: {
unoptimized: true,
},
output: 'export',
reactStrictMode: true,
webpack(config) {
config.plugins.push(
optimizeLocales.webpack({
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"build": "next build",
"analyze": "ANALYZE=true next build",
"start": "next start",
"lint": "next lint"
"lint": "eslint ."
},
"dependencies": {
"@discublog/api": "latest",
Expand Down Expand Up @@ -42,6 +42,7 @@
"@types/unist": "^3.0.2",
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.11.0",
"@zhangyu1818/eslint-config": "^1.0.1",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
"eslint-config-next": "14.2.3",
Expand Down
Loading

0 comments on commit a005891

Please sign in to comment.