Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d9db13eafd | |||
| e9a8243d0d | |||
| fa86b30260 | |||
| 426e4e1e03 | |||
| 7a80fcfa57 | |||
| 39c579c077 | |||
| f835d22269 | |||
| 7979d2db3e | |||
|
|
feb3b31b43 | ||
| 4d1a953099 |
@@ -13,26 +13,6 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Bun
|
|
||||||
uses: oven-sh/setup-bun@v1
|
|
||||||
with:
|
|
||||||
bun-version: latest
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: bun install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: bun run build
|
|
||||||
|
|
||||||
- name: Copy generated file to repo
|
|
||||||
run: |
|
|
||||||
cp dist/index.js index.js
|
|
||||||
git config user.name "gitea-actions[bot]"
|
|
||||||
git config user.email "gitea-actions[bot]@users.noreply.gitea.com"
|
|
||||||
git add index.js
|
|
||||||
git commit -m "chore: update generated index.js" || echo "No changes to commit"
|
|
||||||
git push origin main
|
|
||||||
|
|
||||||
- name: Get version from package.json
|
- name: Get version from package.json
|
||||||
id: pkg
|
id: pkg
|
||||||
run: |
|
run: |
|
||||||
@@ -43,10 +23,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git config user.name "gitea-actions[bot]"
|
git config user.name "gitea-actions[bot]"
|
||||||
git config user.email "gitea-actions[bot]@users.noreply.gitea.com"
|
git config user.email "gitea-actions[bot]@users.noreply.gitea.com"
|
||||||
|
|
||||||
git tag ${{ steps.pkg.outputs.version }}
|
git tag ${{ steps.pkg.outputs.version }}
|
||||||
git push --force origin ${{ steps.pkg.outputs.version }}
|
git push origin ${{ steps.pkg.outputs.version }}
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
|
name: ${{ steps.pkg.outputs.version }}
|
||||||
tag_name: ${{ steps.pkg.outputs.version }}
|
tag_name: ${{ steps.pkg.outputs.version }}
|
||||||
@@ -6,10 +6,4 @@ To install dependencies:
|
|||||||
bun install
|
bun install
|
||||||
```
|
```
|
||||||
|
|
||||||
To run:
|
This project was created using `bun init` in bun v1.3.1. [Bun](https://bun.com)
|
||||||
|
|
||||||
```bash
|
|
||||||
bun run index.ts
|
|
||||||
```
|
|
||||||
|
|
||||||
This project was created using `bun init` in bun v1.3.1. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
|
|
||||||
|
|||||||
1
bun.lock
1
bun.lock
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
|
"configVersion": 0,
|
||||||
"workspaces": {
|
"workspaces": {
|
||||||
"": {
|
"": {
|
||||||
"name": "eslint-config",
|
"name": "eslint-config",
|
||||||
|
|||||||
16
package.json
16
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sebastianbrenner/eslint-config",
|
"name": "@sebastianbrenner/eslint-config",
|
||||||
"version": "1.0.0",
|
"version": "1.0.3",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./index.js",
|
"main": "./index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -8,17 +8,17 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/bun": "latest",
|
"@types/bun": "latest",
|
||||||
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
"@types/eslint-plugin-jsx-a11y": "6.10.1"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"typescript": "5",
|
||||||
"@typescript-eslint/eslint-plugin": "8.48.1",
|
"@typescript-eslint/eslint-plugin": "8.48.1",
|
||||||
"@typescript-eslint/parser": "8.48.1",
|
"@typescript-eslint/parser": "8.48.1",
|
||||||
"eslint": "9.39.1",
|
"eslint": "9.39.1",
|
||||||
"eslint-plugin-import": "^2.32.0",
|
"eslint-plugin-import": "2.32.0",
|
||||||
"eslint-plugin-jsx-a11y": "^6.10.2",
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
||||||
"eslint-plugin-react": "7.37.5",
|
"eslint-plugin-react": "7.37.5",
|
||||||
"eslint-plugin-react-hooks": "7.0.1",
|
"eslint-plugin-react-hooks": "7.0.1",
|
||||||
"eslint-plugin-unused-imports": "^4.3.0"
|
"eslint-plugin-unused-imports": "4.3.0"
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"typescript": "5"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,11 @@ import reactHooks from "eslint-plugin-react-hooks";
|
|||||||
import a11y from "eslint-plugin-jsx-a11y";
|
import a11y from "eslint-plugin-jsx-a11y";
|
||||||
import importPlugin from "eslint-plugin-import";
|
import importPlugin from "eslint-plugin-import";
|
||||||
import unusedImports from "eslint-plugin-unused-imports";
|
import unusedImports from "eslint-plugin-unused-imports";
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
/* Core ESLint recommended rules */
|
/* Core ESLint recommended rules */
|
||||||
js.configs.recommended,
|
js.configs.recommended,
|
||||||
|
|
||||||
/* TypeScript recommended */
|
/* TypeScript recommended */
|
||||||
{
|
{
|
||||||
files: ["**/*.ts", "**/*.tsx"],
|
files: ["**/*.ts", "**/*.tsx"],
|
||||||
@@ -21,10 +23,13 @@ export default [
|
|||||||
plugins: {
|
plugins: {
|
||||||
"@typescript-eslint": tseslint
|
"@typescript-eslint": tseslint
|
||||||
},
|
},
|
||||||
|
|
||||||
...tseslint.configs["recommended-type-checked"]
|
...tseslint.configs["recommended-type-checked"]
|
||||||
},
|
},
|
||||||
|
|
||||||
/* React recommended */
|
/* React recommended */
|
||||||
react.configs.flat.recommended,
|
react.configs.flat.recommended,
|
||||||
|
|
||||||
/* React Hooks recommended */
|
/* React Hooks recommended */
|
||||||
{
|
{
|
||||||
plugins: { "react-hooks": reactHooks },
|
plugins: { "react-hooks": reactHooks },
|
||||||
@@ -32,10 +37,14 @@ export default [
|
|||||||
...reactHooks.configs.recommended.rules
|
...reactHooks.configs.recommended.rules
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/* JSX Accessibility recommended */
|
/* JSX Accessibility recommended */
|
||||||
a11y.flatConfigs.recommended,
|
a11y.flatConfigs.recommended,
|
||||||
|
|
||||||
/* Import validation rules */
|
/* Import validation rules */
|
||||||
importPlugin.flatConfigs.recommended,
|
importPlugin.flatConfigs.recommended,
|
||||||
|
|
||||||
/* Unused imports */
|
/* Unused imports */
|
||||||
{
|
{
|
||||||
plugins: { "unused-imports": unusedImports },
|
plugins: { "unused-imports": unusedImports },
|
||||||
@@ -44,7 +53,12 @@ export default [
|
|||||||
"unused-imports/no-unused-vars": [
|
"unused-imports/no-unused-vars": [
|
||||||
"warn",
|
"warn",
|
||||||
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" }
|
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" }
|
||||||
]
|
],
|
||||||
|
'@stylistic/indent': ['error', 4],
|
||||||
|
'@stylistic/semi': ['error', 'always'],
|
||||||
|
'@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
|
||||||
|
'@stylistic/no-trailing-spaces': 'error',
|
||||||
|
'@stylistic/no-multiple-empty-lines': 'error',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
59
src/index.ts
59
src/index.ts
@@ -1,59 +0,0 @@
|
|||||||
import js from "@eslint/js";
|
|
||||||
import tseslint from "@typescript-eslint/eslint-plugin";
|
|
||||||
import tsParser from "@typescript-eslint/parser";
|
|
||||||
import react from "eslint-plugin-react";
|
|
||||||
import reactHooks from "eslint-plugin-react-hooks";
|
|
||||||
import a11y from "eslint-plugin-jsx-a11y";
|
|
||||||
import importPlugin from "eslint-plugin-import";
|
|
||||||
import unusedImports from "eslint-plugin-unused-imports";
|
|
||||||
|
|
||||||
export default [
|
|
||||||
/* Core ESLint recommended rules */
|
|
||||||
js.configs.recommended,
|
|
||||||
|
|
||||||
/* TypeScript recommended */
|
|
||||||
{
|
|
||||||
files: ["**/*.ts", "**/*.tsx"],
|
|
||||||
languageOptions: {
|
|
||||||
parser: tsParser,
|
|
||||||
parserOptions: {
|
|
||||||
project: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
plugins: {
|
|
||||||
"@typescript-eslint": tseslint
|
|
||||||
},
|
|
||||||
|
|
||||||
...tseslint.configs["recommended-type-checked"]
|
|
||||||
},
|
|
||||||
|
|
||||||
/* React recommended */
|
|
||||||
react.configs.flat.recommended,
|
|
||||||
|
|
||||||
/* React Hooks recommended */
|
|
||||||
{
|
|
||||||
plugins: { "react-hooks": reactHooks },
|
|
||||||
rules: {
|
|
||||||
...reactHooks.configs.recommended.rules
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
/* JSX Accessibility recommended */
|
|
||||||
a11y.flatConfigs.recommended,
|
|
||||||
|
|
||||||
/* Import validation rules */
|
|
||||||
importPlugin.flatConfigs.recommended,
|
|
||||||
|
|
||||||
/* Unused imports */
|
|
||||||
{
|
|
||||||
plugins: { "unused-imports": unusedImports },
|
|
||||||
rules: {
|
|
||||||
"unused-imports/no-unused-imports": "error",
|
|
||||||
"unused-imports/no-unused-vars": [
|
|
||||||
"warn",
|
|
||||||
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
];
|
|
||||||
Reference in New Issue
Block a user