fix: update ESLint ignores and improve i18n audit script readability
This commit is contained in:
@@ -1,2 +1,13 @@
|
||||
LICENSE.md
|
||||
dist/
|
||||
build/
|
||||
vendor/
|
||||
android/
|
||||
ios/
|
||||
resources/
|
||||
.bundle/
|
||||
.agents/
|
||||
.impeccable/
|
||||
package-lock.json
|
||||
Gemfile.lock
|
||||
skills-lock.json
|
||||
|
||||
@@ -15,7 +15,17 @@ import globals from 'globals'
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist'],
|
||||
ignores: [
|
||||
'dist',
|
||||
'build',
|
||||
'vendor',
|
||||
'android',
|
||||
'ios',
|
||||
'resources',
|
||||
'public/assets',
|
||||
'.agents',
|
||||
'.impeccable',
|
||||
],
|
||||
},
|
||||
js.configs.recommended,
|
||||
react.configs.flat.recommended,
|
||||
@@ -51,7 +61,11 @@ export default [
|
||||
eslintConfigPrettier, // Disable any rules that conflict with prettier
|
||||
eslintPluginPrettierRecommended,
|
||||
{
|
||||
files: ['*.{js,ts}'],
|
||||
files: [
|
||||
'*.{js,mjs,cjs,ts}',
|
||||
'scripts/**/*.{js,mjs,cjs,ts}',
|
||||
'workers/**/*.{js,mjs,cjs,ts}',
|
||||
],
|
||||
languageOptions: {
|
||||
globals: globals.node,
|
||||
},
|
||||
@@ -72,9 +86,9 @@ export default [
|
||||
sourceType: 'module',
|
||||
},
|
||||
rules: {
|
||||
// Formatting rules (indent, space-infix-ops) are owned by prettier here —
|
||||
// re-enabling them fights prettier/prettier and makes --fix unable to converge.
|
||||
eqeqeq: 'error',
|
||||
indent: ['error', 2],
|
||||
'space-infix-ops': ['error', { int32Hint: false }],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -52,7 +52,8 @@ const lookup = (ns, key) =>
|
||||
const exists = (ns, key) => {
|
||||
if (lookup(ns, key) !== null) return true
|
||||
const dot = key.lastIndexOf('.')
|
||||
const parent = dot === -1 ? (bundles[ns] ?? null) : lookup(ns, key.slice(0, dot))
|
||||
const parent =
|
||||
dot === -1 ? (bundles[ns] ?? null) : lookup(ns, key.slice(0, dot))
|
||||
const leaf = key.slice(dot + 1)
|
||||
return (
|
||||
parent !== null &&
|
||||
|
||||
Reference in New Issue
Block a user