chore: add publish workflow and developer tooling configurations (#73)

* feat(ci): new release flow, linting

* chore: upgrade yarn, regenerate yarn.lock

* feat: upgrade packages, publish workflow, lint

* chore(lint): prettier default config

* chore: remove gitHead from package.json

* chore: upgrade workflows

* chore: clean packages
This commit is contained in:
2025-12-04 01:46:38 +02:00
committed by GitHub
parent f007324084
commit ad8f7e3a55
23 changed files with 7339 additions and 2541 deletions

View File

@@ -33,15 +33,15 @@ fullest extent, we want to know.
The following behaviors are expected and requested of all community members:
* Participate in an authentic and active way. In doing so, you contribute to the
- Participate in an authentic and active way. In doing so, you contribute to the
health and longevity of this community.
* Exercise consideration and respect in your speech and actions.
* Attempt collaboration before conflict.
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
* Be mindful of your surroundings and of your fellow participants. Alert
- Exercise consideration and respect in your speech and actions.
- Attempt collaboration before conflict.
- Refrain from demeaning, discriminatory, or harassing behavior and speech.
- Be mindful of your surroundings and of your fellow participants. Alert
community leaders if you notice a dangerous situation, someone in distress, or
violations of this Code of Conduct, even if they seem inconsequential.
* Remember that community event venues may be shared with members of the public;
- Remember that community event venues may be shared with members of the public;
please be respectful to all patrons of these locations.
## 4. Unacceptable Behavior
@@ -49,23 +49,23 @@ The following behaviors are expected and requested of all community members:
The following behaviors are considered harassment and are unacceptable within
our community:
* Violence, threats of violence or violent language directed against another
- Violence, threats of violence or violent language directed against another
person.
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory
- Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory
jokes and language.
* Posting or displaying sexually explicit or violent material.
* Posting or threatening to post other people's personally identifying
- Posting or displaying sexually explicit or violent material.
- Posting or threatening to post other people's personally identifying
information ("doxing").
* Personal insults, particularly those related to gender, sexual orientation,
- Personal insults, particularly those related to gender, sexual orientation,
race, religion, or disability.
* Inappropriate photography or recording.
* Inappropriate physical contact. You should have someone's consent before
- Inappropriate photography or recording.
- Inappropriate physical contact. You should have someone's consent before
touching them.
* Unwelcome sexual attention. This includes, sexualized comments or jokes;
- Unwelcome sexual attention. This includes, sexualized comments or jokes;
inappropriate touching, groping, and unwelcomed sexual advances.
* Deliberate intimidation, stalking or following (online or in person).
* Advocating for, or encouraging, any of the above behavior.
* Sustained disruption of community events, including talks and presentations.
- Deliberate intimidation, stalking or following (online or in person).
- Advocating for, or encouraging, any of the above behavior.
- Sustained disruption of community events, including talks and presentations.
## 5. Weapons Policy
@@ -133,10 +133,10 @@ under a [Creative Commons Attribution-ShareAlike license][cc-by-sa].
Portions of text derived from the [Django Code of Conduct][django] and
the [Geek Feminism Anti-Harassment Policy][geek-feminism].
* _Revision 2.3. Posted 6 March 2017._
* _Revision 2.2. Posted 4 February 2016._
* _Revision 2.1. Posted 23 June 2014._
* _Revision 2.0, adopted by the [Stumptown Syndicate][stumptown] board on 10
- _Revision 2.3. Posted 6 March 2017._
- _Revision 2.2. Posted 4 February 2016._
- _Revision 2.1. Posted 23 June 2014._
- _Revision 2.0, adopted by the [Stumptown Syndicate][stumptown] board on 10
January 2013. Posted 17 March 2013._
[stumptown]: https://github.com/stumpsyn

View File

@@ -1,10 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: ivuorinen
---
**Describe the bug**
@@ -12,6 +11,7 @@ A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
@@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: ""
labels: enhancement
assignees: ivuorinen
---
**Is your feature request related to a problem? Please describe.**

View File

@@ -1,6 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>ivuorinen/renovate-config"
]
"extends": ["github>ivuorinen/renovate-config"]
}

View File

@@ -1,46 +1,103 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: 'CodeQL'
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"
on:
push:
branches: ['main']
branches: ["main"]
pull_request:
branches: ['main']
branches: ["main"]
schedule:
- cron: '30 1 * * 0' # Run at 1:30 AM UTC every Sunday
merge_group:
permissions:
actions: read
contents: read
- cron: "22 8 * * 0"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
language: ['javascript'] # Add languages used in your actions
include:
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language':
# 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
uses: github/codeql-action/init@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
with:
languages: ${{ matrix.language }}
queries: security-and-quality
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
- name: Autobuild
uses: github/codeql-action/autobuild@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
uses: github/codeql-action/analyze@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
with:
category: '/language:${{matrix.language}}'
category: "/language:${{matrix.language}}"

View File

@@ -1,10 +1,8 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Lint Code Base
name: Lint PR Code Base
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
@@ -14,17 +12,43 @@ concurrency:
permissions: read-all
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
jobs:
Linter:
name: PR Lint
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
statuses: write
contents: read
issues: write
packages: read
pull-requests: write
statuses: write
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install and enable corepack
shell: sh
run: npm install -g corepack --force && corepack enable
- name: Yarn Lock Changes
uses: Simek/yarn-lock-changes@61d1a0595070b79c1abdc8e1e5a5f5d98b18918c # v0.12.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Run PR Lint
# https://github.com/ivuorinen/actions
uses: ivuorinen/actions/pr-lint@fbbb487332f2b01379192eecb73f7252f1cc54d4 # v2025.11.30
uses: ivuorinen/actions/pr-lint@a52399cf74eac2b0963591ab2c6c8eb0f7f50b2d # v2025.12.03
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

76
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,76 @@
---
name: Publish
on:
push:
branches:
- main
permissions: read-all
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
Linter:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
statuses: write
contents: read
packages: read
issues: write
pull-requests: write
steps:
- name: Run PR Lint
# https://github.com/ivuorinen/actions
uses: ivuorinen/actions/pr-lint@a52399cf74eac2b0963591ab2c6c8eb0f7f50b2d # v2025.12.03
publish:
name: Publish
runs-on: ubuntu-latest
needs:
- Linter
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Setup Node.js Environment
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
always-auth: true
node-version-file: ".nvmrc"
registry-url: "https://registry.npmjs.org"
scope: "@ivuorinen"
- name: Install and enable corepack
shell: sh
run: npm install -g corepack --force && corepack enable
- name: Cache Node Modules
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
id: cache
with:
path: node_modules
key: node-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
shell: bash
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install
- name: Semantic Release
uses: cycjimmy/semantic-release-action@b12c8f6015dc215fe37bc154d4ad456dd3833c90 # v6.0.0
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@@ -4,7 +4,7 @@ name: Stale
on:
schedule:
- cron: '0 8 * * *' # Every day at 08:00
- cron: "0 8 * * *" # Every day at 08:00
workflow_call:
workflow_dispatch:
@@ -23,4 +23,4 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: ivuorinen/actions/stale@fbbb487332f2b01379192eecb73f7252f1cc54d4 # v2025.11.30
- uses: ivuorinen/actions/stale@a52399cf74eac2b0963591ab2c6c8eb0f7f50b2d # v2025.12.03

View File

@@ -8,10 +8,10 @@ on:
- main
- master
paths:
- '.github/labels.yml'
- '.github/workflows/sync-labels.yml'
- ".github/labels.yml"
- ".github/workflows/sync-labels.yml"
schedule:
- cron: '34 5 * * *' # Run every day at 05:34 AM UTC
- cron: "34 5 * * *" # Run every day at 05:34 AM UTC
workflow_call:
workflow_dispatch:
merge_group:
@@ -34,8 +34,8 @@ jobs:
steps:
- name: ⤵️ Checkout Repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: ⤵️ Sync Latest Labels Definitions
uses: ivuorinen/actions/sync-labels@fbbb487332f2b01379192eecb73f7252f1cc54d4 # v2025.11.30
uses: ivuorinen/actions/sync-labels@a52399cf74eac2b0963591ab2c6c8eb0f7f50b2d # v2025.12.03

1
.markdownlintignore Normal file
View File

@@ -0,0 +1 @@
node_modules/

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
22.16.0

View File

@@ -42,13 +42,13 @@ repos:
rev: v0.11.0
hooks:
- id: shellcheck
args: ['--severity=warning']
args: ["--severity=warning"]
- repo: https://github.com/rhysd/actionlint
rev: v1.7.9
hooks:
- id: actionlint
args: ['-shellcheck=']
args: ["-shellcheck="]
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 42.26.11
@@ -56,8 +56,8 @@ repos:
- id: renovate-config-validator
- repo: https://github.com/bridgecrewio/checkov.git
rev: '3.2.495'
rev: "3.2.495"
hooks:
- id: checkov
args:
- '--quiet'
- "--quiet"

3
.releaserc.json Normal file
View File

@@ -0,0 +1,3 @@
{
"extends": ["@ivuorinen/semantic-release-config"]
}

1
.yarnrc.yml Normal file
View File

@@ -0,0 +1 @@
nodeLinker: node-modules

View File

@@ -1,48 +1,28 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.5.12](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/eslint-config@0.5.11...@ivuorinen/eslint-config@0.5.12) (2025-06-21)
### Bug Fixes
* **deps:** update eslint-plugin-jest to 29.0.0 ([#365](https://github.com/ivuorinen/base-configs/issues/365)) ([deed1fa](https://github.com/ivuorinen/base-configs/commit/deed1fa28a4ed5dc1da450d04c6c818269dc47b5))
- **deps:** update eslint-plugin-jest to 29.0.0 ([#365](https://github.com/ivuorinen/base-configs/issues/365)) ([deed1fa](https://github.com/ivuorinen/base-configs/commit/deed1fa28a4ed5dc1da450d04c6c818269dc47b5))
## 0.5.11 (2025-02-23)
**Note:** Version bump only for package @ivuorinen/eslint-config
## 0.5.10 (2025-02-23)
### Bug Fixes
* **deps:** update globals to 16.0.0 ([#342](https://github.com/ivuorinen/base-configs/issues/342)) ([04b333b](https://github.com/ivuorinen/base-configs/commit/04b333b445b6beb4344d2f9102bb5d3dc72ae26a))
- **deps:** update globals to 16.0.0 ([#342](https://github.com/ivuorinen/base-configs/issues/342)) ([04b333b](https://github.com/ivuorinen/base-configs/commit/04b333b445b6beb4344d2f9102bb5d3dc72ae26a))
## 0.5.9 (2025-01-17)
### Bug Fixes
* **deps:** update eslint-config-prettier to 10.0.1 ([#324](https://github.com/ivuorinen/base-configs/issues/324)) ([8a0d38e](https://github.com/ivuorinen/base-configs/commit/8a0d38e173df40b771d42b694a24145559200506))
- **deps:** update eslint-config-prettier to 10.0.1 ([#324](https://github.com/ivuorinen/base-configs/issues/324)) ([8a0d38e](https://github.com/ivuorinen/base-configs/commit/8a0d38e173df40b771d42b694a24145559200506))
## 0.5.8 (2024-11-25)
@@ -84,7 +64,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
- **deps:** update eslint-plugin-sonarjs to 2.0.0 ([#289](https://github.com/ivuorinen/base-configs/issues/289)) ([987baa6](https://github.com/ivuorinen/base-configs/commit/987baa6272b68aaab4aa34ca86892c1dd06fea77))
# [0.5.0](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/eslint-config@0.4.48...@ivuorinen/eslint-config@0.5.0) (2024-08-21)
## [0.5.0](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/eslint-config@0.4.48...@ivuorinen/eslint-config@0.5.0) (2024-08-21)
- feat!: upgrade to eslint 9, update configs ([ad9ed82](https://github.com/ivuorinen/base-configs/commit/ad9ed820d606e7fe484b7b5f553b5dc13277f037))
@@ -373,7 +353,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
- **deps:** update dependency eslint-plugin-sonarjs to v0.22.0 ([13e9457](https://github.com/ivuorinen/base-configs/commit/13e945747fe7a69c7d3bcd3151d38415656b5f93))
# [0.4.0](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/eslint-config@0.3.4...@ivuorinen/eslint-config@0.4.0) (2023-11-01)
## [0.4.0](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/eslint-config@0.3.4...@ivuorinen/eslint-config@0.4.0) (2023-11-01)
### Features
@@ -399,7 +379,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
- **deps:** update dependency eslint-plugin-import to v2.29.0 ([#117](https://github.com/ivuorinen/base-configs/issues/117)) ([f1507a2](https://github.com/ivuorinen/base-configs/commit/f1507a230fa41af9a48061848a3c92a667313193))
# [0.3.0](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/eslint-config@0.2.19...@ivuorinen/eslint-config@0.3.0) (2023-10-25)
## [0.3.0](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/eslint-config@0.2.19...@ivuorinen/eslint-config@0.3.0) (2023-10-25)
### Features
@@ -513,7 +493,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
**Note:** Version bump only for package @ivuorinen/eslint-config
# [0.2.0](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/eslint-config@0.1.11...@ivuorinen/eslint-config@0.2.0) (2023-07-08)
## [0.2.0](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/eslint-config@0.1.11...@ivuorinen/eslint-config@0.2.0) (2023-07-08)
### Features

View File

@@ -1,2 +1,2 @@
import config from './wrapper.mjs'
export default config
import config from "./wrapper.mjs";
export default config;

View File

@@ -1,12 +1,12 @@
'use strict'
"use strict";
const globals = require('globals')
const configEslint = require('eslint-config-eslint')
const configPrettier = require('eslint-config-prettier')
const pluginImport = require('eslint-plugin-import')
const pluginJs = require('@eslint/js')
const pluginN = require('eslint-plugin-n')
const pluginPromise = require('eslint-plugin-promise')
const globals = require("globals");
const configEslint = require("eslint-config-eslint");
const configPrettier = require("eslint-config-prettier");
const pluginImport = require("eslint-plugin-import");
const pluginJs = require("@eslint/js");
const pluginN = require("eslint-plugin-n");
const pluginPromise = require("eslint-plugin-promise");
/**
* @type { import("eslint").Linter.Config[] } config eslint configuration.
@@ -15,42 +15,42 @@ module.exports = [
...configEslint,
{
linterOptions: {
reportUnusedDisableDirectives: 'warn'
reportUnusedDisableDirectives: "warn",
},
rules: {
'func-style': [
'error',
'declaration',
"func-style": [
"error",
"declaration",
{
allowArrowFunctions: true
}
]
}
allowArrowFunctions: true,
},
],
},
},
{
files: ['**/*.{js,mjs,cjs}'],
files: ["**/*.{js,mjs,cjs}"],
languageOptions: {
globals: {
...globals.browser,
...globals.commonjs,
...globals.es2021,
...globals.node
...globals.node,
},
parserOptions: {
ecmaVersion: 12
}
}
ecmaVersion: 12,
},
},
},
pluginJs.configs.recommended,
{
plugins: {
n: pluginN,
import: pluginImport,
promise: pluginPromise
}
promise: pluginPromise,
},
},
configPrettier,
{
ignores: ['coverage/', 'dist/', 'lib/', 'node_modules/']
}
]
ignores: ["coverage/", "dist/", "lib/", "node_modules/"],
},
];

View File

@@ -1,6 +1,6 @@
'use strict'
"use strict";
const jest = require('eslint-plugin-jest')
const jest = require("eslint-plugin-jest");
/**
* eslint configuration for jest.
@@ -8,21 +8,21 @@ const jest = require('eslint-plugin-jest')
*/
module.exports = [
{
files: ['**/*.{js,mjs,cjs}'],
files: ["**/*.{js,mjs,cjs}"],
languageOptions: {
globals: {
...jest.globals
}
}
...jest.globals,
},
jest.configs['flat/recommended'],
jest.configs['flat/style'],
},
},
jest.configs["flat/recommended"],
jest.configs["flat/style"],
{
rules: {
...jest.rules['flat/recommended'].rules
...jest.rules["flat/recommended"].rules,
},
plugins: {
jest
}
}
]
jest,
},
},
];

View File

@@ -48,20 +48,24 @@
"url": "git+https://github.com/ivuorinen/base-configs-eslint.git"
},
"scripts": {
"postinstall": "node scripts/postinstall.cjs"
"postinstall": "node scripts/postinstall.cjs",
"semantic-release": "semantic-release --ci"
},
"dependencies": {
"@eslint/js": "^9",
"@ivuorinen/config-checker": "^1.1.12",
"eslint": "^9.15.0",
"@eslint/js": "^9.39.1",
"@ivuorinen/config-checker": "^2.1.1",
"eslint": "^9.39.1",
"eslint-config-eslint": "^13.0.0",
"eslint-config-prettier": "^10.0.0",
"eslint-plugin-import": "^2",
"eslint-plugin-jest": "^29.0.0",
"eslint-plugin-n": "^17",
"eslint-plugin-promise": "^7",
"globals": "^16.0.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-jest": "^29.2.1",
"eslint-plugin-n": "^17.23.1",
"eslint-plugin-promise": "^7.2.1",
"globals": "^16.5.0",
"typescript": ">=4.2.0"
},
"gitHead": "23d15f15743fb59c1dbe658615ef2ed51c54d230"
"devDependencies": {
"@ivuorinen/semantic-release-config": "*"
},
"packageManager": "yarn@4.12.0"
}

View File

@@ -1,21 +1,21 @@
'use strict'
"use strict";
/* eslint no-console: "off", n/no-process-exit: "off" -- CLI app that gives users feedback */
const fs = require('node:fs')
const path = require('node:path')
const process = require('node:process')
const checkConfig = require('@ivuorinen/config-checker')
const foundConfig = checkConfig('eslint')
const fs = require("node:fs");
const path = require("node:path");
const process = require("node:process");
const checkConfig = require("@ivuorinen/config-checker");
const foundConfig = checkConfig("eslint");
if (foundConfig.length > 0) {
console.log('eslint-config: Found existing eslint config file, skipping creation.')
console.log('eslint-config: If you want to create a new config file, please remove the existing one.')
console.log(`eslint-config: Found config files at: ${foundConfig.join(', ')}`)
process.exit(0)
console.log("eslint-config: Found existing eslint config file, skipping creation.");
console.log("eslint-config: If you want to create a new config file, please remove the existing one.");
console.log(`eslint-config: Found config files at: ${foundConfig.join(", ")}`);
process.exit(0);
}
const filePath = path.join(process.env.INIT_CWD, 'eslint.config.mjs')
const filePath = path.join(process.env.INIT_CWD, "eslint.config.mjs");
const fileConfig = `import ivuorinenConfig from '@ivuorinen/eslint-config';
export default [
@@ -28,8 +28,8 @@ export default [
}
}
];
`
`;
if (!fs.existsSync(filePath)) {
fs.writeFileSync(filePath, fileConfig)
fs.writeFileSync(filePath, fileConfig);
}

View File

@@ -1,2 +1,2 @@
import config from './jest.cjs'
export default config
import config from "./jest.cjs";
export default config;

View File

@@ -1,2 +1,2 @@
import config from './index.cjs'
export default config
import config from "./index.cjs";
export default config;

9396
yarn.lock

File diff suppressed because it is too large Load Diff