Skip to content

Commit

Permalink
[chore] eslint 9 + commit hooks reworked
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Besson committed Nov 20, 2024
1 parent e8188f5 commit a0005dc
Show file tree
Hide file tree
Showing 9 changed files with 325 additions and 327 deletions.
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

16 changes: 0 additions & 16 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx lint-staged
lint-staged
3 changes: 0 additions & 3 deletions .lintstagedrc.json

This file was deleted.

6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3359,7 +3359,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__nccwpck_require__(7484));
const exec_1 = __nccwpck_require__(5236);
const github = __importStar(__nccwpck_require__(3228));
const utils_js_1 = __nccwpck_require__(8006);
const utils_1 = __nccwpck_require__(8006);
const plugin_paginate_graphql_1 = __nccwpck_require__(5089);
const printer_1 = __nccwpck_require__(9936);
const path_1 = __nccwpck_require__(6928);
Expand All @@ -3375,8 +3375,8 @@ const labels = (core.getInput('labels') || '')
.split(',')
.map((label) => label.trim())
.filter((label) => !!label);
const MyOctokit = utils_js_1.GitHub.plugin(plugin_paginate_graphql_1.paginateGraphql);
const octokit = new MyOctokit((0, utils_js_1.getOctokitOptions)(githubToken));
const MyOctokit = utils_1.GitHub.plugin(plugin_paginate_graphql_1.paginateGraphql);
const octokit = new MyOctokit((0, utils_1.getOctokitOptions)(githubToken));
async function run() {
try {
core.info('Check if there is a branch and a matching PR already existing for caniuse db update');
Expand Down
16 changes: 16 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{ ignores: ['dist/**', 'lib/**', 'node_modules/**', 'src/generated/graphql.ts', '*.sh', '*.graphql'] },
eslint.configs.recommended,
tseslint.configs.recommended,
{
rules: {
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/camelcase': 'off',
},
},
);
Loading

0 comments on commit a0005dc

Please sign in to comment.