Skip to content

Commit

Permalink
fix(deps): bump up all deps, migrate to lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
Avivbens committed Apr 18, 2024
1 parent 966782a commit b5c1391
Show file tree
Hide file tree
Showing 6 changed files with 3,220 additions and 2,899 deletions.
29 changes: 18 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,35 @@
/**
* @type {import('eslint').Linter.Config}
*/
module.exports = {
$schema: 'http://json.schemastore.org/eslintrc',
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
ecmaVersion: 2020,
},
plugins: [
'@typescript-eslint/eslint-plugin',
'jest',
'prettier',
'deprecation',
'unused-imports',
],
plugins: ['@typescript-eslint/eslint-plugin', 'jest', 'prettier', 'deprecation', 'unused-imports'],
extends: [
'plugin:@typescript-eslint/recommended',
'eslint:recommended',
'plugin:prettier/recommended',
'prettier',
'plugin:jsonc/recommended-with-jsonc',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
'no-unused-vars': 'off',
'no-constant-condition': 'off',
'no-useless-escape': 'off',
'prettier/prettier': [
'error',
{
Expand All @@ -50,5 +48,14 @@ module.exports = {
'jest/prefer-expect-assertions': 0,
},
},
{
files: ['*.json'],
parser: 'jsonc-eslint-parser',
extends: ['plugin:jsonc/recommended-with-jsonc'],
rules: {
'deprecation/deprecation': 'off',
'@typescript-eslint/consistent-type-imports': 'off',
},
},
],
}
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
5 changes: 1 addition & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run pre-commit
npx lint-staged
7 changes: 7 additions & 0 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = process.env.CI
? {
'**/*.(js|ts|json|yaml)': 'npm run lint',
}
: {
'**/*.(js|ts|json|yaml)': 'npm run lint:fix',
}
Loading

0 comments on commit b5c1391

Please sign in to comment.