Skip to content

Commit daec2b3

Browse files
committedJul 13, 2023
feat: remove unused dependencies
1 parent 9a77177 commit daec2b3

8 files changed

+195
-103
lines changed
 

‎.github/workflows/codeql-analysis.yml

+34-34
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# You may wish to alter this file to override the set of languages analyzed,
55
# or to provide custom queries or build logic.
6-
name: "CodeQL"
6+
name: 'CodeQL'
77

88
on:
99
push:
@@ -29,43 +29,43 @@ jobs:
2929
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
3030

3131
steps:
32-
- name: Checkout repository
33-
uses: actions/checkout@v3
34-
with:
35-
# We must fetch at least the immediate parents so that if this is
36-
# a pull request then we can checkout the head.
37-
fetch-depth: 2
32+
- name: Checkout repository
33+
uses: actions/checkout@v3
34+
with:
35+
# We must fetch at least the immediate parents so that if this is
36+
# a pull request then we can checkout the head.
37+
fetch-depth: 2
3838

39-
# If this run was triggered by a pull request event, then checkout
40-
# the head of the pull request instead of the merge commit.
41-
- run: git checkout HEAD^2
42-
if: ${{ github.event_name == 'pull_request' }}
39+
# If this run was triggered by a pull request event, then checkout
40+
# the head of the pull request instead of the merge commit.
41+
- run: git checkout HEAD^2
42+
if: ${{ github.event_name == 'pull_request' }}
4343

44-
# Initializes the CodeQL tools for scanning.
45-
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@v2
47-
with:
48-
languages: ${{ matrix.language }}
49-
# If you wish to specify custom queries, you can do so here or in a config file.
50-
# By default, queries listed here will override any specified in a config file.
51-
# Prefix the list here with "+" to use these queries and those in the config file.
52-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v2
47+
with:
48+
languages: ${{ matrix.language }}
49+
# If you wish to specify custom queries, you can do so here or in a config file.
50+
# By default, queries listed here will override any specified in a config file.
51+
# Prefix the list here with "+" to use these queries and those in the config file.
52+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5353

54-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55-
# If this step fails, then you should remove it and run the build manually (see below)
56-
- name: Autobuild
57-
uses: github/codeql-action/autobuild@v2
54+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55+
# If this step fails, then you should remove it and run the build manually (see below)
56+
- name: Autobuild
57+
uses: github/codeql-action/autobuild@v2
5858

59-
# ℹ️ Command-line programs to run using the OS shell.
60-
# 📚 https://git.io/JvXDl
59+
# ℹ️ Command-line programs to run using the OS shell.
60+
# 📚 https://git.io/JvXDl
6161

62-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63-
# and modify them (or add more) to build your code if your project
64-
# uses a compiled language
62+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63+
# and modify them (or add more) to build your code if your project
64+
# uses a compiled language
6565

66-
#- run: |
67-
# make bootstrap
68-
# make release
66+
#- run: |
67+
# make bootstrap
68+
# make release
6969

70-
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@v2
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v2

‎.github/workflows/release-please.yml

-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ jobs:
1414
token: ${{ secrets.BJERKBOT_GITHUB_TOKEN }}
1515
release-type: node
1616
package-name: '@bjerk/eslint-config'
17-

‎.prettierignore

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# TypeScript v1 declaration files
45+
typings/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
75+
# parcel-bundler cache (https://parceljs.org/)
76+
.cache
77+
78+
# Next.js build output
79+
.next
80+
81+
# Nuxt.js build / generate output
82+
.nuxt
83+
dist
84+
85+
# Gatsby files
86+
.cache/
87+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88+
# https://nextjs.org/blog/next-9-1#public-directory-support
89+
# public
90+
91+
# vuepress build output
92+
.vuepress/dist
93+
94+
# Serverless directories
95+
.serverless/
96+
97+
# FuseBox cache
98+
.fusebox/
99+
100+
# DynamoDB Local files
101+
.dynamodb/
102+
103+
# TernJS port file
104+
.tern-port
105+
106+
CHANGELOG.md
107+
yarn.lock
108+
pnpm-lock.yaml

‎.prettierrc

-7
This file was deleted.

‎README.md

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
# eslint-config
1+
# bjerk/eslint-config
22

33
These are Bjerk's eslint config, used on most of our projects.
44

5-
This is derived work from [runeh](https://github.com/runeh) and Indiv AS:
6-
https://github.com/runeh/typical-fetch/blob/main/.eslintrc.json
7-
85
We'd **actually** love more users of our config, so if you have ideas on
96
improvements – please file an issue or pull request!
107

@@ -19,8 +16,8 @@ consider using this:
1916
npx check-peer-dependencies
2017
```
2118

22-
Or, if you're using [pnpm], you can make it install peer
23-
dependencies automatically:
19+
Or, if you're using [pnpm], you can make it install peer dependencies
20+
automatically:
2421

2522
```shell
2623
pnpm config set auto-install-peers true --location project
@@ -38,7 +35,8 @@ To make all this config work, you only need to add this to `package.json`:
3835
}
3936
```
4037

41-
Tip: We often use this along with `@simenandre/prettier`, a shared Prettier config.
38+
Tip: We often use this along with `@simenandre/prettier`, a shared Prettier
39+
config.
4240

4341
## Migrate from v2?
4442

@@ -62,3 +60,12 @@ yarn add -D eslint-plugin-jest
6260
}
6361
}
6462
```
63+
64+
## Thanks
65+
66+
This config is inspired by:
67+
68+
- [runeh](https://github.com/runeh/typical-fetch/blob/main/.eslintrc.json)
69+
- [Indiv](https://github.com/indivorg/eslint-config)
70+
71+
Thanks are in order! 🙏

‎index.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
/**
2-
* This eslint config is derived work from @runeh and Indiv AS:
3-
* https://github.com/runeh/typical-fetch/blob/main/.eslintrc.json
4-
*/
5-
6-
module.exports = {
1+
const eslintConfig = {
72
extends: [
83
'eslint:recommended',
94
'plugin:@typescript-eslint/eslint-recommended',
@@ -55,7 +50,6 @@ module.exports = {
5550
'parseInt',
5651
],
5752
'no-return-await': 'error',
58-
'prefer-arrow-callback': 'error',
5953
quotes: [
6054
'error',
6155
'single',
@@ -104,3 +98,6 @@ module.exports = {
10498
},
10599
],
106100
};
101+
102+
// eslint-disable-next-line no-undef
103+
module.exports = eslintConfig;

‎package.json

+26-24
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,47 @@
11
{
22
"name": "@bjerk/eslint-config",
33
"version": "4.2.0",
4-
"repository": "github.com:bjerkio/eslint-config",
54
"license": "Apache-2.0",
65
"author": "Bjerk AS",
6+
"repository": "github.com:bjerkio/eslint-config",
77
"main": "index.js",
8-
"prettier": "@simenandre/prettier",
9-
"devDependencies": {
8+
"scripts": {
9+
"format": "prettier --write .",
10+
"lint": "eslint -c index.js --ext .ts,.tsx,.js,.jsx ."
11+
},
12+
"peerDependencies": {
1013
"@typescript-eslint/eslint-plugin": "^5.59.0",
1114
"@typescript-eslint/parser": "^5.59.0",
12-
"eslint": "^8.38.0",
15+
"eslint": "^7.32.0 || ^8.2.0",
1316
"eslint-config-prettier": "^8.8.0",
1417
"eslint-plugin-eslint-comments": "^3.2.0",
1518
"eslint-plugin-import": "^2.27.5",
16-
"eslint-plugin-prettier": "^4.2.1",
1719
"eslint-plugin-promise": "^6.1.1",
18-
"eslint-plugin-unicorn": "^47.0.0",
19-
"prettier": "^3.0.0",
20-
"@simenandre/prettier": "4.0.1"
20+
"eslint-plugin-unicorn": "^47.0.0"
2121
},
22-
"peerDependencies": {
22+
"peerDependenciesMeta": {
23+
"prettier": {
24+
"optional": true
25+
}
26+
},
27+
"devDependencies": {
28+
"@simenandre/prettier": "^4.1.0",
2329
"@typescript-eslint/eslint-plugin": "^5.59.0",
2430
"@typescript-eslint/parser": "^5.59.0",
25-
"eslint": "^7.32.0 || ^8.2.0",
31+
"eslint": "^8.38.0",
2632
"eslint-config-prettier": "^8.8.0",
2733
"eslint-plugin-eslint-comments": "^3.2.0",
2834
"eslint-plugin-import": "^2.27.5",
29-
"eslint-plugin-prettier": "^4.2.1",
3035
"eslint-plugin-promise": "^6.1.1",
3136
"eslint-plugin-unicorn": "^47.0.0",
32-
"prettier": "^3.0.0"
37+
"prettier": "^3.0.0",
38+
"typescript": "^5.1.6"
39+
},
40+
"engines": {
41+
"node": ">=16"
42+
},
43+
"publishConfig": {
44+
"access": "public"
3345
},
3446
"peerDevDependencies": [
3547
"@typescript-eslint/eslint-plugin",
@@ -43,18 +55,8 @@
4355
"eslint-plugin-unicorn",
4456
"prettier"
4557
],
46-
"peerDependenciesMeta": {
47-
"prettier": {
48-
"optional": true
49-
}
50-
},
51-
"engines": {
52-
"node": ">=16"
53-
},
58+
"prettier": "@simenandre/prettier",
5459
"volta": {
5560
"node": "18.16.1"
56-
},
57-
"publishConfig": {
58-
"access": "public"
5961
}
60-
}
62+
}

‎yarn.lock

+9-23
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@
100100
"@nodelib/fs.scandir" "2.1.5"
101101
fastq "^1.6.0"
102102

103-
"@simenandre/prettier@4.0.1":
104-
version "4.0.1"
105-
resolved "https://registry.yarnpkg.com/@simenandre/prettier/-/prettier-4.0.1.tgz#0ec2bc0a81d81e4ae0dd5bc6efa7e9408aace2ce"
106-
integrity sha512-7ys2sGGqVQ1rTtjOgbgOwLDSUNRw/PiaCAWv97dE1d2VZDFxGNvn1BIQqhJrYL3jZBKAKSLH7evkzL8G6QB3ew==
103+
"@simenandre/prettier@^4.1.0":
104+
version "4.1.0"
105+
resolved "https://registry.yarnpkg.com/@simenandre/prettier/-/prettier-4.1.0.tgz#615b3fbd9b3badde0aadb08ff4f29a6335625419"
106+
integrity sha512-pi+gR9eoM+019Tbij6idtR1ocK/NhgNHpfC0vTQ72JJy9yk224apXmrP7wsT3wr/N6xOkGpApQK84KtEtweQlg==
107107
dependencies:
108108
prettier-plugin-package-perfection "^1.1.0"
109109

@@ -615,13 +615,6 @@ eslint-plugin-import@^2.27.5:
615615
semver "^6.3.0"
616616
tsconfig-paths "^3.14.1"
617617

618-
eslint-plugin-prettier@^4.2.1:
619-
version "4.2.1"
620-
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b"
621-
integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==
622-
dependencies:
623-
prettier-linter-helpers "^1.0.0"
624-
625618
eslint-plugin-promise@^6.1.1:
626619
version "6.1.1"
627620
resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz#269a3e2772f62875661220631bd4dafcb4083816"
@@ -758,11 +751,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
758751
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
759752
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
760753

761-
fast-diff@^1.1.2:
762-
version "1.3.0"
763-
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0"
764-
integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==
765-
766754
fast-glob@^3.2.9:
767755
version "3.3.0"
768756
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.0.tgz#7c40cb491e1e2ed5664749e87bfb516dbe8727c0"
@@ -1501,13 +1489,6 @@ prelude-ls@^1.2.1:
15011489
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
15021490
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
15031491

1504-
prettier-linter-helpers@^1.0.0:
1505-
version "1.0.0"
1506-
resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
1507-
integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==
1508-
dependencies:
1509-
fast-diff "^1.1.2"
1510-
15111492
prettier-package-json@2.6.0:
15121493
version "2.6.0"
15131494
resolved "https://registry.yarnpkg.com/prettier-package-json/-/prettier-package-json-2.6.0.tgz#624eeb604a4c19af146c1d1c824d31afd2690e2a"
@@ -1859,6 +1840,11 @@ typed-array-length@^1.0.4:
18591840
for-each "^0.3.3"
18601841
is-typed-array "^1.1.9"
18611842

1843+
typescript@^5.1.6:
1844+
version "5.1.6"
1845+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274"
1846+
integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==
1847+
18621848
unbox-primitive@^1.0.2:
18631849
version "1.0.2"
18641850
resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e"

0 commit comments

Comments
 (0)
Please sign in to comment.