Skip to content

Commit

Permalink
use @chubbyts/chubbyts-packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikzogg committed Jan 3, 2025
1 parent 988d6b0 commit 7c68887
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 76 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
push:
pull_request:
branches:
- master
schedule:
- cron: '0 0 * * *'

jobs:
node18:
name: Node 18
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: checkout node
uses: actions/setup-node@v4
with:
node-version: '18'
- run: npm install
node20:
name: Node 20
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: checkout node
uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm install
node22:
name: Node 22
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: checkout node
uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm install
- run: npm run cs
- name: sonarcloud.io
uses: sonarsource/sonarqube-scan-action@v4.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
# chubbyts-eslint

[![CI](https://github.com/chubbyts/chubbyts-eslint/workflows/CI/badge.svg?branch=master)](https://github.com/chubbyts/chubbyts-eslint/actions?query=workflow%3ACI)
[![npm-version](https://img.shields.io/npm/v/@chubbyts/chubbyts-eslint.svg)](https://www.npmjs.com/package/@chubbyts/chubbyts-eslint)

[![bugs](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-eslint&metric=bugs)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-eslint)
[![code_smells](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-eslint&metric=code_smells)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-eslint)
[![duplicated_lines_density](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-eslint&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-eslint)
[![ncloc](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-eslint&metric=ncloc)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-eslint)
[![sqale_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-eslint&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-eslint)
[![alert_status](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-eslint&metric=alert_status)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-eslint)
[![reliability_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-eslint&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-eslint)
[![security_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-eslint&metric=security_rating)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-eslint)
[![sqale_index](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-eslint&metric=sqale_index)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-eslint)
[![vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-eslint&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-eslint)

## Description

ESLint Configuration for chubbyts libraries / framework / projects.
Expand All @@ -22,7 +34,7 @@ ESLint Configuration for chubbyts libraries / framework / projects.
Through [NPM](https://www.npmjs.com) as [@chubbyts/chubbyts-eslint][1].

```sh
npm i @chubbyts/chubbyts-eslint@^3.0.0
npm i @chubbyts/chubbyts-eslint@^3.0.1
```

## Configuration
Expand All @@ -47,7 +59,7 @@ Example for a codebase with typescript files in src and tests:
#### eslint.config.cjs

```js
module.exports = require('@chubbyts/chubbyts-eslint/eslint.config').default;
module.exports = require('@chubbyts/chubbyts-eslint/dist/eslint.config').default;
```

### Module
Expand All @@ -70,7 +82,7 @@ Example for a codebase with typescript files in src and tests:
#### eslint.config.mjs

```js
export { default } from '@chubbyts/chubbyts-eslint/eslint.config';
export { default } from '@chubbyts/chubbyts-eslint/dist/eslint.config';
```

## Copyright
Expand Down
1 change: 1 addition & 0 deletions build.mjs
47 changes: 0 additions & 47 deletions eslintrc.ts

This file was deleted.

20 changes: 9 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@chubbyts/chubbyts-eslint",
"type": "module",
"version": "3.0.0",
"version": "3.0.1",
"description": "ESLint Configuration for chubbyts libraries / framework / projects.",
"keywords": [
"chubbyts",
Expand All @@ -11,12 +11,9 @@
"license": "MIT",
"repository": "chubbyts/chubbyts-eslint",
"scripts": {
"build:cjs": "tsc --module CommonJS --outDir dist/cjs",
"build:esm": "tsc --module ESNext --outDir dist/esm",
"build:types": "tsc --declaration --emitDeclarationOnly --outDir dist/types",
"build": "rm -Rf dist && npm run build:cjs && npm run build:esm && npm run build:types",
"cs-fix": "prettier --write eslintrc.ts",
"cs": "prettier --check eslintrc.ts",
"build": "node ./build.mjs",
"cs-fix": "prettier --write src",
"cs": "prettier --check src",
"prepare": "npm run build"
},
"prettier": {
Expand All @@ -30,16 +27,17 @@
],
"exports": {
"./*": {
"types": "./dist/types/*.d.ts",
"require": "./dist/cjs/*.js",
"import": "./dist/esm/*.js",
"default": "./dist/esm/*.js"
"types": "./*.d.ts",
"require": "./*.cjs",
"import": "./*.mjs",
"default": "./*.mjs"
}
},
"engines": {
"node": ">=18"
},
"dependencies": {
"@chubbyts/chubbyts-packaging": "^3.0.0-rc.1",
"@eslint/js": "^9.17.0",
"eslint": "^9.17.0",
"eslint-import-resolver-typescript": "^3.7.0",
Expand Down
7 changes: 7 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sonar.organization=chubbyts
sonar.projectKey=chubbyts_chubbyts-eslint
sonar.projectName=chubbyts-eslint

sonar.sources=src
sonar.language=typescript
sonar.sourceEncoding=UTF-8
File renamed without changes.
15 changes: 0 additions & 15 deletions tsconfig.json

This file was deleted.

1 change: 1 addition & 0 deletions tsconfig.json

0 comments on commit 7c68887

Please sign in to comment.