mirror of
https://github.com/hanzoai/sign.git
synced 2026-10-21 01:21:51 +00:00
ESLint was raised to 10, which reads eslint.config.* and nothing else. This repo still said it all in .eslintrc.cjs and .eslintignore, so every lint run ended at "couldn't find an eslint.config file" — and the pre-commit hook runs eslint over staged sources, so no commit touching a .ts file could be made. The config is the same config in the flat spelling: every rule, every ignore and the __tests__ override carried over, and the two legacy files are gone rather than left beside it to disagree. The transaction rule (inside $transaction, only `tx`) keeps both its callers. transaction.cjs is a whole flat config, so `lint:tx` still hands it to eslint alone — with --no-config-lookup, since --no-eslintrc and --ext no longer exist — and the shared config spreads it in. Its test now gives the linter the array AS SHIPPED instead of re-stating the parser beside a copy of the rules: a copy keeps passing after the original stops selecting files. 10 of 10, and `lint:tx` is clean over packages and apps. eslint-plugin-react finds the React version by asking the rule context for a filename through an API ESLint 10 removed, so detection threw on the first file. The version is stated, which never takes that path. Co-authored-by: Hanzo Dev <[email protected]>
41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
const shared = require('@hanzo/esign-eslint-config');
|
|
|
|
/** @type {import('eslint').Linter.Config[]} */
|
|
module.exports = [
|
|
{
|
|
// What is never linted. These were `.eslintignore` and `ignorePatterns`; a
|
|
// flat config keeps them in the one file that holds everything else.
|
|
ignores: [
|
|
// Config files
|
|
'**/*.config.js',
|
|
'**/*.config.cjs',
|
|
'**/*.config.mjs',
|
|
// Statically hosted javascript files
|
|
'apps/*/public/*.js',
|
|
'apps/*/public/*.cjs',
|
|
'scripts/**',
|
|
'**/lingui.config.ts',
|
|
'packages/lib/translations/**/*.js',
|
|
// Generated
|
|
'packages/prisma/generated/**',
|
|
],
|
|
},
|
|
|
|
...shared,
|
|
|
|
{
|
|
settings: {
|
|
next: { rootDir: ['apps/*/'] },
|
|
// Stated, not detected. eslint-plugin-react finds the version by asking the
|
|
// rule context for a filename through an API ESLint 10 removed, so detection
|
|
// throws on the first file; a declared version never takes that path.
|
|
react: { version: '19.2.8' },
|
|
},
|
|
rules: {
|
|
'@next/next/no-img-element': 'off',
|
|
'no-unreachable': 'error',
|
|
'react-hooks/exhaustive-deps': 'off',
|
|
},
|
|
},
|
|
];
|