Skip to content

Commit

Permalink
chore: fix linter for monorepo root files
Browse files Browse the repository at this point in the history
  • Loading branch information
yeager-eren authored and RyukTheCoder committed Jan 24, 2024
1 parent 2be516c commit 75cc960
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
// "project": ["tsconfig.base.json"]
"project": true
},
"rules": {
Expand Down
14 changes: 14 additions & 0 deletions .lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import micromatch from 'micromatch';

const eslintIgnoredFiles = ['**/global-wallets-env.d.ts'];

export default {
'*.{ts,tsx}': (files) => {
const match = micromatch.not(files, eslintIgnoredFiles);
return `eslint --fix --quiet ${match.join(' ')}`;
},

'*.{ts,tsx,json}': (files) => {
return `prettier --write ${files.join(' ')}`;
},
};
8 changes: 0 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,5 @@
},
"resolutions": {
"react-refresh": "0.9.0"
},
"lint-staged": {
"*.{ts,tsx}": [
"eslint --fix --quiet"
],
"*.{ts,tsx,json}": [
"prettier --write"
]
}
}

0 comments on commit 75cc960

Please sign in to comment.