-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from defi-wonderland/dev
release: boilerplate update
- Loading branch information
Showing
39 changed files
with
9,325 additions
and
7,798 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |
|
||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
version: 9 | ||
|
||
- name: Create env file | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
|
||
npx lint-staged | ||
|
||
. "$(dirname "$0")/wonderland/find-crypto-keys.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
|
||
import { fixupConfigRules, fixupPluginRules } from '@eslint/compat'; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
import js from '@eslint/js'; | ||
import tsParser from '@typescript-eslint/parser'; | ||
import prettierConfig from 'eslint-config-prettier'; | ||
import importPlugin from 'eslint-plugin-import'; | ||
import prettierPlugin from 'eslint-plugin-prettier'; | ||
import reactRefresh from 'eslint-plugin-react-refresh'; | ||
import globals from 'globals'; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all, | ||
}); | ||
|
||
export default [ | ||
{ | ||
ignores: ['**/dist', '**/eslint.config.mjs'], | ||
}, | ||
...fixupConfigRules( | ||
compat.extends( | ||
'prettier', | ||
'plugin:react/recommended', | ||
'plugin:jsx-a11y/recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:import/typescript', | ||
'plugin:react/jsx-runtime', | ||
'plugin:react-hooks/recommended', | ||
'plugin:@next/next/recommended', | ||
), | ||
), | ||
{ | ||
files: ['**/*.{js,mjs,cjs,jsx,ts,tsx}'], | ||
plugins: { | ||
'react-refresh': reactRefresh, | ||
import: fixupPluginRules(importPlugin), | ||
prettier: fixupPluginRules(prettierPlugin), | ||
}, | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
}, | ||
parser: tsParser, | ||
}, | ||
rules: { | ||
'import/order': [ | ||
'error', | ||
{ | ||
'newlines-between': 'never', | ||
alphabetize: { | ||
order: 'asc', | ||
caseInsensitive: false, | ||
}, | ||
// Enforce a specific import order | ||
groups: ['external', 'builtin', 'parent', 'sibling', 'index', 'object', 'type', 'unknown'], | ||
pathGroups: [ | ||
{ | ||
pattern: 'react', | ||
group: 'external', | ||
position: 'before', | ||
}, | ||
{ | ||
pattern: 'next', | ||
group: 'external', | ||
position: 'before', | ||
}, | ||
{ | ||
pattern: 'next/**', | ||
group: 'external', | ||
position: 'before', | ||
}, | ||
{ | ||
pattern: '~/assets/**', | ||
group: 'unknown', | ||
position: 'after', | ||
}, | ||
{ | ||
pattern: '~/**', | ||
group: 'parent', | ||
position: 'before', | ||
}, | ||
], | ||
pathGroupsExcludedImportTypes: ['react'], | ||
}, | ||
], | ||
// Prettier plugin to apply formatting rules | ||
'prettier/prettier': 'error', // This tells ESLint to show Prettier errors as ESLint errors | ||
'@typescript-eslint/no-empty-object-type': 'off', | ||
'@typescript-eslint/no-empty-interface': 'off', | ||
}, | ||
settings: { | ||
// Spread Prettier config to disable conflicting ESLint rules | ||
...prettierConfig, | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.