Skip to content

Commit

Permalink
Bump the eslint group across 1 directory with 4 updates (#44)
Browse files Browse the repository at this point in the history
* Bump the eslint group across 1 directory with 4 updates

Bumps the eslint group with 4 updates in the / directory: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser), [eslint](https://github.com/eslint/eslint) and [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha).


Updates `@typescript-eslint/eslint-plugin` from 7.7.1 to 8.9.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.9.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 7.7.1 to 8.9.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.9.0/packages/parser)

Updates `eslint` from 8.57.0 to 9.12.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.57.0...v9.12.0)

Updates `eslint-plugin-mocha` from 10.4.3 to 10.5.0
- [Release notes](https://github.com/lo1tuma/eslint-plugin-mocha/releases)
- [Changelog](https://github.com/lo1tuma/eslint-plugin-mocha/blob/10.5.0/CHANGELOG.md)
- [Commits](lo1tuma/eslint-plugin-mocha@10.4.3...10.5.0)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: eslint
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: eslint
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: eslint
- dependency-name: eslint-plugin-mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <[email protected]>

* migrate to eslint 9 and lint in CI

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Momtchil Momtchev <[email protected]>
  • Loading branch information
dependabot[bot] and mmomtchev authored Oct 17, 2024
1 parent e552194 commit 886605f
Show file tree
Hide file tree
Showing 6 changed files with 373 additions and 350 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

67 changes: 0 additions & 67 deletions .eslintrc.json

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@ name: 'CI'
on: [pull_request, push]

jobs:
lint:
runs-on: ubuntu-latest
name: Lint

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint


swig:
runs-on: ubuntu-latest
name: Generate the SWIG wrappers
Expand Down
80 changes: 80 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import mocha from 'eslint-plugin-mocha';
import globals from 'globals';
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [{
ignores: ['test/browser/build/*', 'build/*', 'lib/binding/*'],
}, ...compat.extends('eslint:recommended'), {
plugins: {
mocha,
},

languageOptions: {
globals: {
...globals.mocha,
...globals['shared-node-browser'],
__karma__: true,
process: true,
},

ecmaVersion: 2020,
sourceType: 'module',
},

rules: {
semi: [2, 'always'],
quotes: ['error', 'single'],
},
}, ...compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
).map(config => ({
...config,
files: ['test/*.ts'],
})), {
files: ['test/*.ts'],

plugins: {
'@typescript-eslint': typescriptEslint,
},

languageOptions: {
parser: tsParser,
},

rules: {
'@typescript-eslint/ban-ts-comment': 'off',
},
}, {
files: ['**/*.cjs'],

languageOptions: {
ecmaVersion: 2015,
sourceType: 'commonjs',
globals: {
...globals.node
}
},
}, {
files: ['test/browser/*.js'],

languageOptions: {
globals: {
...globals.browser,
},
},
}];
Loading

0 comments on commit 886605f

Please sign in to comment.