add linter
This commit is contained in:
parent
28906bfb80
commit
d684ad6045
6 changed files with 1091 additions and 22 deletions
14
.eslintignore
Normal file
14
.eslintignore
Normal file
|
@ -0,0 +1,14 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
/build
|
||||
/.svelte-kit
|
||||
/package
|
||||
.env
|
||||
.env.\*
|
||||
!.env.example
|
||||
|
||||
# Ignore files for PNPM, NPM and YARN
|
||||
|
||||
pnpm-lock.yaml
|
||||
package-lock.json
|
||||
yarn.lock
|
28
.eslintrc.cjs
Normal file
28
.eslintrc.cjs
Normal file
|
@ -0,0 +1,28 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
extends: ['eslint:recommended', 'prettier', 'plugin:unicorn/recommended'],
|
||||
parserOptions: {
|
||||
sourceType: 'module',
|
||||
ecmaVersion: 2022
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
es2017: true,
|
||||
node: true
|
||||
},
|
||||
plugins: ['unicorn'],
|
||||
rules: {
|
||||
'no-var': 'error',
|
||||
'prefer-const': 'error',
|
||||
quotes: ['error', 'single', { avoidEscape: true }],
|
||||
'quote-props': ['error', 'as-needed'],
|
||||
'no-constant-condition': ['error', { checkLoops: false }],
|
||||
'no-duplicate-imports': 'error',
|
||||
'no-inner-declarations': 'off',
|
||||
'unicorn/prevent-abbreviations': 'off',
|
||||
'unicorn/prefer-string-replace-all': 'off',
|
||||
'unicorn/numeric-separators-style': 'off',
|
||||
'unicorn/template-indent': 'off',
|
||||
'unicorn/no-nested-ternary': 'off'
|
||||
}
|
||||
}
|
13
.prettierignore
Normal file
13
.prettierignore
Normal file
|
@ -0,0 +1,13 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
/build
|
||||
/.svelte-kit
|
||||
/package
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
# Ignore files for PNPM, NPM and YARN
|
||||
pnpm-lock.yaml
|
||||
package-lock.json
|
||||
yarn.lock
|
8
.prettierrc
Normal file
8
.prettierrc
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"semi": false,
|
||||
"useTabs": true,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"arrowParens": "avoid",
|
||||
"bracketSameLine": false
|
||||
}
|
43
package.json
43
package.json
|
@ -1,20 +1,27 @@
|
|||
{
|
||||
"name": "opengraph",
|
||||
"version": "1.0.0",
|
||||
"description": "OG server for git.gay",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [
|
||||
"git.gay",
|
||||
"og"
|
||||
],
|
||||
"author": "besties",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@besties/html2png": "^0.1.2",
|
||||
"express": "^4.18.2"
|
||||
},
|
||||
"type": "module"
|
||||
"name": "opengraph",
|
||||
"version": "1.0.0",
|
||||
"description": "OG server for git.gay",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
"lint": "prettier --check . && eslint .",
|
||||
"format": "prettier --write ."
|
||||
},
|
||||
"keywords": [
|
||||
"git.gay",
|
||||
"og"
|
||||
],
|
||||
"author": "besties",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@besties/html2png": "^0.1.2",
|
||||
"express": "^4.18.2"
|
||||
},
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"eslint": "^8.46.0",
|
||||
"eslint-config-prettier": "^8.9.0",
|
||||
"eslint-plugin-unicorn": "^48.0.1",
|
||||
"prettier": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
|
1007
pnpm-lock.yaml
1007
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue