Skip to content

Commit

Permalink
Merge pull request #173 from RightCapitalHQ/feature/migrate-to-eslint-v9
Browse files Browse the repository at this point in the history
chore: bump ESLint to v9
  • Loading branch information
frantic1048 authored Oct 21, 2024
2 parents 74ad78b + 32e404c commit e838f56
Show file tree
Hide file tree
Showing 9 changed files with 1,972 additions and 314 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

29 changes: 0 additions & 29 deletions .eslintrc.cjs

This file was deleted.

16 changes: 16 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import eslintConfigRightcapital from '@rightcapital/eslint-config';

const { config } = eslintConfigRightcapital.utils;

export default config(
{
ignores: ['dist'],
},
...eslintConfigRightcapital.configs.recommended,
{
files: ['**/*.{ts,cts,mts}'],
rules: {
'no-void': ['error', { allowAsStatement: true }],
},
},
);
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,16 @@
"@commitlint/cli": "19.5.0",
"@commitlint/config-conventional": "19.5.0",
"@commitlint/cz-commitlint": "19.5.0",
"@rightcapital/eslint-config-javascript": "25.1.1",
"@rightcapital/eslint-config-typescript": "25.1.1",
"@rightcapital/eslint-config": "37.0.1",
"@rightcapital/prettier-config": "7.1.8",
"@types/node": "20.16.13",
"@vercel/ncc": "0.38.2",
"beachball": "2.47.1",
"commitizen": "4.3.1",
"concurrently": "8.2.2",
"eslint": "8.57.1",
"eslint": "9.13.0",
"husky": "9.1.6",
"prettier": "3.3.3",
"prettier-plugin-packagejson": "2.5.3",
"typescript": "5.6.3",
"vitest": "1.6.0"
},
Expand Down
2,217 changes: 1,948 additions & 269 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions prettier.config.cjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
const baseConfig = require('@rightcapital/prettier-config');

/** @type {import('prettier').Options} */
const config = {
...baseConfig,
plugins: ['prettier-plugin-packagejson'],
};

module.exports = config;
module.exports = require('@rightcapital/prettier-config');
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as core from '@actions/core';
import { exec } from '@actions/exec';

import { generateReleaseNotes, getChangelogJson, parseGitTag } from './util';

const token = core.getInput('token', { required: true });
Expand Down
1 change: 1 addition & 0 deletions src/util.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, test } from 'vitest';

import { type IParseGitTagResult, parseGitTag } from './util';

describe.concurrent('parseGitTag', () => {
Expand Down
5 changes: 3 additions & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { readFile } from 'node:fs/promises';
import { relative, dirname } from 'node:path';
import { dirname, relative } from 'node:path';

import * as core from '@actions/core';
import * as glob from '@actions/glob';
import type { ChangelogJson, ChangelogJsonEntry, ChangeType } from 'beachball';
Expand Down Expand Up @@ -98,7 +99,7 @@ export async function getChangelogJson({
let resolvedChangelogJsonPath: string | undefined;
for await (const changelogJsonPath of globber.globGenerator()) {
const changelogJson = JSON.parse(
await readFile(changelogJsonPath, 'utf-8'),
await readFile(changelogJsonPath, 'utf8'),
) as ChangelogJson;

if (changelogJson.name !== name) {
Expand Down

0 comments on commit e838f56

Please sign in to comment.