Skip to content
This repository was archived by the owner on Apr 23, 2024. It is now read-only.

Commit 16eb578

Browse files
committed
First commit
0 parents  commit 16eb578

File tree

8 files changed

+424
-0
lines changed

8 files changed

+424
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root=true
2+
3+
[*]
4+
charset=utf-8
5+
insert_final_newline=true
6+
7+
[*.{js,json,json5}]
8+
indent_size=2
9+
indent_style=space

.eslintrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"env": {
3+
"node": true
4+
},
5+
"extends": ["./index.js"]
6+
}

.github/renovate.json5

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
extends: [
3+
'config:base',
4+
5+
// Make sure we get a single PR combining all updates
6+
'group:all',
7+
],
8+
9+
// Disable dependency dashboard
10+
dependencyDashboard: false,
11+
12+
// Use our labelling system
13+
labels: ['dependencies'],
14+
15+
// Schedule the PRs to interleave with our release schedule
16+
schedule: 'on the 2nd and 4th day instance on sunday after 11pm',
17+
18+
// We generally always want the major version
19+
separateMajorMinor: false,
20+
21+
// We manually update digest dependencies (eg. hashes in Github actions)
22+
digest: { enabled: false },
23+
}

.github/workflows/publish.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Publish
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
npm:
9+
name: NPM Package
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
- name: Use Node.js 16.x
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: 16.x
18+
- name: Cache dependencies
19+
uses: actions/cache@v3
20+
with:
21+
path: ~/.npm
22+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
23+
restore-keys: |
24+
${{ runner.os }}-node-
25+
- name: Remove dark theme images from README
26+
uses: mondeja/strip-gh-theme-links@v3
27+
with:
28+
files: README.md
29+
strict: true
30+
- name: Install dependencies
31+
run: npm ci
32+
- name: Deploy to NPM
33+
uses: JS-DevTools/npm-publish@v1
34+
with:
35+
token: ${{ secrets.NPM_TOKEN }}
36+
github:
37+
name: GitHub release
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v3
42+
- name: Get release version
43+
id: get-version
44+
run: |
45+
export PACKAGE_VERSION=$(cat package.json | grep 'version' | sed 's/[ \",:]//g' | sed 's/version//')
46+
echo "::set-output name=version::$PACKAGE_VERSION"
47+
- name: Remove dark theme images from README
48+
uses: mondeja/strip-gh-theme-links@v3
49+
with:
50+
files: README.md
51+
strict: true
52+
- name: Configure GIT credentials
53+
run: |
54+
git config user.name "${GITHUB_ACTOR}"
55+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
56+
# Commit that will only be included in the tag
57+
- name: Commit dark theme images strip
58+
run: |
59+
git add README.md
60+
git commit -m 'Strip README dark theme image links'
61+
- name: Create and push git tag
62+
run: |
63+
set -e
64+
tag="${{ steps.get-version.outputs.version }}"
65+
git tag -a "${tag}" -m ""
66+
git push origin "${tag}"
67+
- name: Create GitHub release
68+
uses: actions/create-release@v1
69+
env:
70+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
with:
72+
tag_name: ${{ steps.get-version.outputs.version }}
73+
release_name: Release ${{ steps.get-version.outputs.version }}
74+
body: |
75+
See https://github.com/simple-icons/simple-icons/releases/tag/${{ steps.get-version.outputs.version }}

.github/workflows/verify.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Verify Source
2+
on: [pull_request, push]
3+
4+
jobs:
5+
lint:
6+
name: Lint
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v3
11+
- name: Use Node.js 16.x
12+
uses: actions/setup-node@v3
13+
with:
14+
node-version: 16.x
15+
- name: Cache dependencies
16+
uses: actions/cache@v3
17+
with:
18+
path: ~/.npm
19+
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
20+
restore-keys: |
21+
${{ runner.os }}-node-
22+
- name: Install dependencies
23+
run: npm i
24+
- name: Run linter
25+
run: npm run lint
26+
- name: Verify file permissions
27+
run: |
28+
CHECK_DIRS="icons/ _data/"
29+
echo "Searching the following directories for executable files:"
30+
echo "${CHECK_DIRS}"
31+
echo ""
32+
EXE_FILES=$(find ${CHECK_DIRS} -type f -executable)
33+
if test -n "${EXE_FILES-}"
34+
then
35+
echo "Some files were detected to have their executable bit set."
36+
echo "To fix this, you can use 'chmod -x PATH/TO/FILE' on the following files:"
37+
echo ""
38+
echo "${EXE_FILES}"
39+
exit 1
40+
else
41+
echo "All clear."
42+
exit 0
43+
fi
44+
test:
45+
name: Test package
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v3
50+
- name: Use Node.js 16.x
51+
uses: actions/setup-node@v3
52+
with:
53+
node-version: 16.x
54+
- name: Cache dependencies
55+
uses: actions/cache@v3
56+
with:
57+
path: ~/.npm
58+
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
59+
restore-keys: |
60+
${{ runner.os }}-node-
61+
- name: Install dependencies
62+
run: npm i
63+
- name: Run tests
64+
run: npm run test

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
### NodeJS ###
2+
# Logs
3+
logs
4+
*.log
5+
npm-debug.log*
6+
yarn-debug.log*
7+
yarn-error.log*
8+
lerna-debug.log*
9+
yarn.lock
10+
package-lock.json
11+
12+
# Dependency directories
13+
node_modules/
14+
15+
### macOS ###
16+
# General
17+
.DS_Store
18+
.AppleDouble
19+
.LSOverride
20+
21+
# Icon must end with two \r
22+
Icon
23+
24+
# Thumbnails
25+
._*
26+
27+
# Files that might appear in the root of a volume
28+
.DocumentRevisions-V100
29+
.fseventsd
30+
.Spotlight-V100
31+
.TemporaryItems
32+
.Trashes
33+
.VolumeIcon.icns
34+
.com.apple.timemachine.donotpresent
35+
36+
# Directories potentially created on remote AFP share
37+
.AppleDB
38+
.AppleDesktop
39+
Network Trash Folder
40+
Temporary Items
41+
.apdisk

index.js

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
module.exports = {
2+
rules: {
3+
"constructor-super": "error",
4+
"for-direction": "error",
5+
"getter-return": "error",
6+
"no-async-promise-executor": "error",
7+
"no-case-declarations": "error",
8+
"no-class-assign": "error",
9+
"no-compare-neg-zero": "error",
10+
"no-cond-assign": "error",
11+
"no-const-assign": "error",
12+
"no-constant-condition": "error",
13+
"no-control-regex": "error",
14+
"no-debugger": "error",
15+
"no-delete-var": "error",
16+
"no-dupe-args": "error",
17+
"no-dupe-class-members": "error",
18+
"no-dupe-else-if": "error",
19+
"no-dupe-keys": "error",
20+
"no-duplicate-case": "error",
21+
"no-empty": "error",
22+
"no-empty-character-class": "error",
23+
"no-empty-pattern": "error",
24+
"no-ex-assign": "error",
25+
"no-extra-boolean-cast": "error",
26+
"no-fallthrough": "error",
27+
"no-func-assign": "error",
28+
"no-global-assign": "error",
29+
"no-import-assign": "error",
30+
"no-inner-declarations": "error",
31+
"no-invalid-regexp": "error",
32+
"no-irregular-whitespace": "error",
33+
"no-loss-of-precision": "error",
34+
"no-misleading-character-class": "error",
35+
"no-new-symbol": "error",
36+
"no-nonoctal-decimal-escape": "error",
37+
"no-obj-calls": "error",
38+
"no-octal": "error",
39+
"no-prototype-builtins": "error",
40+
"no-redeclare": "error",
41+
"no-regex-spaces": "error",
42+
"no-self-assign": "error",
43+
"no-setter-return": "error",
44+
"no-shadow-restricted-names": "error",
45+
"no-sparse-arrays": "error",
46+
"no-this-before-super": "error",
47+
"no-undef": "error",
48+
"no-unreachable": "error",
49+
"no-unsafe-finally": "error",
50+
"no-unsafe-negation": "error",
51+
"no-unsafe-optional-chaining": "error",
52+
"no-unused-labels": "error",
53+
"no-useless-backreference": "error",
54+
"no-useless-catch": "error",
55+
"no-useless-escape": "error",
56+
"no-with": "error",
57+
"require-yield": "error",
58+
"use-isnan": "error",
59+
"valid-typeof": "error",
60+
61+
"no-console": ["error", { allow: ["error", "info"] }],
62+
"no-unused-vars": ["error", { varsIgnorePattern: "^_$" }],
63+
"no-duplicate-imports": "error",
64+
"no-constructor-return": "error",
65+
"no-template-curly-in-string": "error",
66+
"no-unreachable-loop": "error",
67+
"no-use-before-define": "error",
68+
"default-case-last": "error",
69+
eqeqeq: "error",
70+
"dot-notation": "error",
71+
"max-lines": ["error", { max: 1000 }],
72+
"no-alert": "error",
73+
"no-eval": "error",
74+
"no-extend-native": "error",
75+
"no-inline-comments": "error",
76+
"no-lonely-if": "error",
77+
"no-shadow": "error",
78+
"no-useless-call": "error",
79+
"no-useless-concat": "error",
80+
"no-var": "error",
81+
"one-var": ["error", "never"],
82+
"prefer-const": "error",
83+
"prefer-object-has-own": "error",
84+
"require-await": "error",
85+
"spaced-comment": "error",
86+
yoda: "error",
87+
88+
// The rest are rules that you never need to enable when using Prettier.
89+
curly: 0,
90+
"lines-around-comment": 0,
91+
"max-len": 0,
92+
"no-confusing-arrow": 0,
93+
"no-mixed-operators": 0,
94+
"no-tabs": 0,
95+
"no-unexpected-multiline": 0,
96+
quotes: 0,
97+
98+
"arrow-body-style": "off",
99+
"prefer-arrow-callback": "off",
100+
"array-bracket-newline": "off",
101+
"array-bracket-spacing": "off",
102+
"array-element-newline": "off",
103+
"arrow-parens": "off",
104+
"arrow-spacing": "off",
105+
"block-spacing": "off",
106+
"brace-style": "off",
107+
"comma-dangle": "off",
108+
"comma-spacing": "off",
109+
"comma-style": "off",
110+
"computed-property-spacing": "off",
111+
"dot-location": "off",
112+
"eol-last": "off",
113+
"func-call-spacing": "off",
114+
"function-call-argument-newline": "off",
115+
"function-paren-newline": "off",
116+
"generator-star": "off",
117+
"generator-star-spacing": "off",
118+
"implicit-arrow-linebreak": "off",
119+
indent: "off",
120+
"jsx-quotes": "off",
121+
"key-spacing": "off",
122+
"keyword-spacing": "off",
123+
"linebreak-style": "off",
124+
"multiline-ternary": "off",
125+
"newline-per-chained-call": "off",
126+
"new-parens": "off",
127+
"no-arrow-condition": "off",
128+
"no-comma-dangle": "off",
129+
"no-extra-parens": "off",
130+
"no-extra-semi": "off",
131+
"no-floating-decimal": "off",
132+
"no-mixed-spaces-and-tabs": "off",
133+
"no-multi-spaces": "off",
134+
"no-multiple-empty-lines": "off",
135+
"no-reserved-keys": "off",
136+
"no-space-before-semi": "off",
137+
"no-trailing-spaces": "off",
138+
"no-whitespace-before-property": "off",
139+
"no-wrap-func": "off",
140+
"nonblock-statement-body-position": "off",
141+
"object-curly-newline": "off",
142+
"object-curly-spacing": "off",
143+
"object-property-newline": "off",
144+
"one-var-declaration-per-line": "off",
145+
"operator-linebreak": "off",
146+
"padded-blocks": "off",
147+
"quote-props": "off",
148+
"rest-spread-spacing": "off",
149+
semi: "off",
150+
"semi-spacing": "off",
151+
"semi-style": "off",
152+
"space-after-function-name": "off",
153+
"space-after-keywords": "off",
154+
"space-before-blocks": "off",
155+
"space-before-function-paren": "off",
156+
"space-before-function-parentheses": "off",
157+
"space-before-keywords": "off",
158+
"space-in-brackets": "off",
159+
"space-in-parens": "off",
160+
"space-infix-ops": "off",
161+
"space-return-throw-case": "off",
162+
"space-unary-ops": "off",
163+
"space-unary-word-ops": "off",
164+
"switch-colon-spacing": "off",
165+
"template-curly-spacing": "off",
166+
"template-tag-spacing": "off",
167+
"unicode-bom": "off",
168+
"wrap-iife": "off",
169+
"wrap-regex": "off",
170+
"yield-star-spacing": "off",
171+
},
172+
};

0 commit comments

Comments
 (0)