Skip to content

Commit

Permalink
Refactor ESLint configuration and update TypeScript target version
Browse files Browse the repository at this point in the history
  • Loading branch information
SoraKumo001 committed Dec 14, 2024
1 parent 309cab9 commit 5174393
Show file tree
Hide file tree
Showing 9 changed files with 2,425 additions and 1,369 deletions.
24 changes: 0 additions & 24 deletions .eslintrc.json

This file was deleted.

36 changes: 22 additions & 14 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,44 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Cache modules(yarn.lock)
- run: corepack enable pnpm
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache node modules
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.OS }}-build-
- name: Package install
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
lookup-only: true
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn
run: pnpm install --frozen-lockfile
StorybookBuild:
name: Build
needs: Modules
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
steps:
- uses: actions/checkout@v3
- name: Cache modules(yarn.lock)
id: cache
uses: actions/cache@v3
- run: corepack enable pnpm
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.OS }}-build-
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Test
run: |
mkdir test
yarn test:url
npm run test:url
- name: Deploy
if: github.ref_name == 'master'
run: |
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
tsconfig.json
/test
.eslintrc.json
.github
43 changes: 43 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* @type {import('eslint').Linter.FlatConfig[]}
*/
import eslint from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import importPlugin from 'eslint-plugin-import';
import tslint from 'typescript-eslint';

export default [
eslint.configs.recommended,
...tslint.configs.recommended,
{},
{
plugins: { import: importPlugin },
},
{
rules: {
'@typescript-eslint/no-unused-vars': 0,
'no-empty-pattern': 0,
'no-empty': 0,
'import/order': [
'warn',
{
groups: [
'builtin',
'external',
'internal',
['parent', 'sibling'],
'object',
'type',
'index',
],
pathGroupsExcludedImportTypes: ['builtin'],
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
},
},
eslintConfigPrettier,
];
28 changes: 15 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openapi-to-md",
"version": "1.0.23",
"version": "1.0.25",
"main": "dist/index.js",
"bin": {
"openapi-to-md": "dist/index.js"
Expand All @@ -15,20 +15,22 @@
},
"license": "MIT",
"devDependencies": {
"@types/node": "^18.15.11",
"@types/swagger2openapi": "^7.0.0",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/parser": "^5.57.0",
"eslint": "^8.37.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"openapi-types": "^12.1.0",
"prettier": "^2.8.7",
"ts-node": "^10.9.1",
"typescript": "^5.0.3"
"@types/node": "^22.10.2",
"@types/swagger2openapi": "^7.0.4",
"@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0",
"eslint": "9.17.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-import": "^2.31.0",
"openapi-types": "^12.1.3",
"prettier": "^3.4.2",
"ts-node": "^10.9.2",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.0"
},
"dependencies": {
"commander": "^10.0.0",
"commander": "^12.1.0",
"swagger2openapi": "*",
"yaml": "*"
},
Expand Down
Loading

0 comments on commit 5174393

Please sign in to comment.