Skip to content

Commit a01e5e3

Browse files
feat(setup): init
1 parent b002f7b commit a01e5e3

21 files changed

+9888
-0
lines changed

.browserslistrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
>= 0.4% and last 4 versions, iOS >= 15, Firefox ESR, not dead, not and_qq >= 0, not and_uc >= 0, not samsung >=0, not kaios >=0, not op_mini all

.editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
insert_final_newline = false
14+
trim_trailing_whitespace = false
15+

.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# env vars

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.husky/commit-msg

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
export NVM_DIR="$HOME/.nvm"
5+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
6+
7+
npx --no-install commitlint --edit $1

.husky/pre-commit

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
export NVM_DIR="$HOME/.nvm"
5+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
6+
7+
npx --no-install lint-staged

.lintstagedrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"*.(js)": [
3+
"npm run lint:es"
4+
]
5+
}

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lts/*

.prettierrc.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"arrowParens": "avoid",
3+
"bracketSameLine": true,
4+
"trailingComma": "none",
5+
"singleQuote": true,
6+
"semi": true,
7+
"printWidth": 100
8+
}

.releaserc

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"branches": [
3+
{
4+
"name": "main",
5+
"channel": "latest",
6+
"prerelease": false
7+
},
8+
{
9+
"name": "beta",
10+
"prerelease": true
11+
}
12+
],
13+
"extends": "semantic-release-monorepo",
14+
"plugins": [
15+
"@semantic-release/commit-analyzer",
16+
"@semantic-release/release-notes-generator",
17+
[
18+
"@semantic-release/changelog",
19+
{
20+
"changelogFile": "CHANGELOG.md",
21+
"changelogTitle": "# Project Changelog"
22+
}
23+
],
24+
[
25+
"@semantic-release/npm"
26+
],
27+
[
28+
"@semantic-release/git",
29+
{
30+
"assets": [
31+
"CHANGELOG.md",
32+
"CHANGELOG_PROJECT.md",
33+
"package.json",
34+
"package-lock.json",
35+
"npm-shrinkwrap.json"
36+
]
37+
}
38+
],
39+
[
40+
"@semantic-release/github"
41+
]
42+
]
43+
}

commitlint.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
extends: ['@commitlint/config-conventional']
3+
};

eslint.config.js

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import js from '@eslint/js';
2+
import globals from 'globals';
3+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
4+
import eslintPluginSecurity from 'eslint-plugin-security';
5+
import eslintPluginMocha from 'eslint-plugin-mocha';
6+
import eslintIgnores from './eslint.ignores.js';
7+
8+
export default [
9+
eslintPluginSecurity.configs.recommended,
10+
eslintPluginPrettierRecommended,
11+
eslintPluginMocha.configs.flat.recommended,
12+
js.configs.recommended,
13+
{
14+
files: ['**/*.js'],
15+
ignores: eslintIgnores,
16+
languageOptions: {
17+
globals: {
18+
...globals.browser,
19+
myCustomGlobal: 'readonly'
20+
}
21+
},
22+
rules: {
23+
'block-spacing': 'error',
24+
complexity: ['error', { max: 7 }],
25+
// 'import/order': ['error', { groups: ['builtin', 'external', 'parent', 'sibling', 'index'] }],
26+
'no-console': 'warn',
27+
'no-debugger': 'warn',
28+
'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 1 }],
29+
'no-unused-vars': 'warn'
30+
}
31+
}
32+
];

eslint.ignores.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default [];

0 commit comments

Comments
 (0)