Skip to content
Snippets Groups Projects
Unverified Commit ed50e2b3 authored by Jed Fox's avatar Jed Fox Committed by GitHub
Browse files

Run ESLint at the top level once (#1202)

This significantly speeds up `yarn lint` for me. It also ensures we’re
listing all source files in the project, including the `.eslintrc` files
and any other files that may be present.
parent ea4a68e0
No related branches found
No related tags found
No related merge requests found
Showing
with 52 additions and 54 deletions
packages/api/app/bundle.api.js
packages/api/dist
packages/crdt/dist
packages/desktop-client/bundle.browser.js
packages/desktop-client/build/
packages/desktop-client/public/kcab/
packages/desktop-client/public/data/
packages/desktop-client/**/node_modules/*
packages/desktop-client/node_modules/
packages/desktop-electron/client-build/
packages/desktop-electron/dist/
packages/import-ynab4/**/node_modules/*
packages/import-ynab5/**/node_modules/*
packages/loot-core/**/node_modules/*
packages/loot-core/**/lib-dist/*
packages/loot-core/**/proto/*
packages/node-libofx/libofx.*.js
packages/node-libofx/libofx/
packages/node-libofx/OpenSP-*/
......@@ -70,7 +70,7 @@ module.exports = {
],
'import/no-useless-path-segments': 'error',
'import/no-duplicates': ['error', { 'prefer-inline': true }],
'import/no-unused-modules': ['error', { 'unusedExports': true }],
'import/no-unused-modules': ['error', { unusedExports: true }],
'import/order': [
'error',
{
......@@ -120,8 +120,11 @@ module.exports = {
},
overrides: [
{
files: ['./**/*.js'],
files: ['.eslintrc.js', './**/.eslintrc.js'],
parserOptions: { project: null },
rules: {
'@typescript-eslint/consistent-type-exports': 'off',
},
},
{
files: [
......@@ -171,29 +174,32 @@ module.exports = {
files: ['./packages/loot-core/src/**/*'],
rules: {
// defining 'src' to check all packages is slow, so only do it for loot-core
'import/no-unused-modules': ['error', { 'unusedExports': true, 'src': ['../**/*.{js,ts,tsx}'] }],
}
'import/no-unused-modules': [
'error',
{ unusedExports: true, src: ['../**/*.{js,ts,tsx}'] },
],
},
},
{
files: [
'**/icons/**/*.js',
'**/mocks/**/*.{js,ts,tsx}',
'**/{mocks,__mocks__}/*.{js,ts,tsx}',
'**/icons/**/*.js',
'**/mocks/**/*.{js,ts,tsx}',
'**/{mocks,__mocks__}/*.{js,ts,tsx}',
// can't correctly resolve usages
'**/*.{testing,electron,browser,web,api}.ts',
'packages/loot-core/src/server/main.ts'
'packages/loot-core/src/server/main.ts',
],
rules: { 'import/no-unused-modules': 'off' }
rules: { 'import/no-unused-modules': 'off' },
},
],
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
},
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
}
},
};
......@@ -33,7 +33,7 @@
"e2e": "yarn workspaces foreach --parallel --verbose run e2e",
"rebuild-electron": "./node_modules/.bin/electron-rebuild -f -m ./packages/loot-core",
"rebuild-node": "yarn workspace loot-core rebuild",
"lint": "cross-env NODE_ENV=development yarn workspaces foreach --verbose run lint --max-warnings 0",
"lint": "eslint . --max-warnings 0",
"typecheck": "yarn tsc",
"postinstall": "patch-package"
},
......
app/bundle.api.js
dist
......@@ -9,7 +9,6 @@
"dist"
],
"scripts": {
"lint": "eslint .",
"build:app": "yarn workspace loot-core build:api",
"build:node": "tsc --p tsconfig.dist.json",
"build:migrations": "cp migrations/*.sql dist/migrations",
......
dist
......@@ -9,7 +9,6 @@
"dist"
],
"scripts": {
"lint": "eslint .",
"build:node": "tsc --p tsconfig.dist.json",
"build": "rm -rf dist && yarn run build:node && cp src/proto/sync_pb.d.ts dist/src/proto/",
"test": "jest -c jest.config.js"
......
bundle.browser.js
build/
public/kcab/
public/data/
**/node_modules/*
node_modules/
......@@ -58,8 +58,7 @@
"build": "cross-env INLINE_RUNTIME_CHUNK=false react-app-rewired build",
"build:browser": "cross-env ./bin/build-browser",
"test": "react-app-rewired test",
"e2e": "npx playwright test --browser=chromium",
"lint": "eslint ."
"e2e": "npx playwright test --browser=chromium"
},
"jest": {
"setupFilesAfterEnv": [
......
client-build/
dist/
......@@ -8,7 +8,6 @@
"clean": "rm -rf dist",
"update-client": "bin/update-client",
"build": "electron-builder",
"lint": "eslint .",
"watch": "cross-env ACTUAL_DOCUMENT_DIR=\"../../data\" ACTUAL_DATA_DIR=\"../../data\" electron ."
},
"main": "index.js",
......
......@@ -5,7 +5,6 @@
"exports": "./lib/index.js",
"type": "commonjs",
"scripts": {
"lint": "eslint .",
"test": "jest"
},
"dependencies": {
......
**/node_modules/*
\ No newline at end of file
......@@ -15,9 +15,6 @@
},
"bin": "./index.js",
"homepage": "https://github.com/actualbudget/actual/tree/master/packages/import-ynab4#readme",
"scripts": {
"lint": "eslint ."
},
"dependencies": {
"@actual-app/api": "*",
"adm-zip": "^0.5.9",
......
**/node_modules/*
\ No newline at end of file
......@@ -15,9 +15,6 @@
},
"bin": "./index.js",
"homepage": "https://github.com/actualbudget/actual/tree/master/packages/import-ynab5#readme",
"scripts": {
"lint": "eslint ."
},
"dependencies": {
"@actual-app/api": "*",
"date-fns": "^2.29.3",
......
**/node_modules/*
**/lib-dist/*
**/proto/*
......@@ -9,7 +9,6 @@
"build:api": "cross-env NODE_ENV=development webpack --config ./webpack/webpack.api.config.js; ./bin/copy-migrations ../api",
"build:browser": "cross-env NODE_ENV=production ./bin/build-browser",
"watch:browser": "cross-env NODE_ENV=development ./bin/build-browser",
"lint": "eslint .",
"test": "npm-run-all -cp 'test:*'",
"test:node": "jest -c jest.config.js",
"test:web": "jest -c jest.web.config.js"
......
libofx.*.js
libofx/
OpenSP-*/
......@@ -4,8 +4,5 @@
"description": "",
"main": "index.js",
"author": "",
"license": "ISC",
"scripts": {
"lint": "eslint ."
}
"license": "ISC"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment