Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = false
tab_width = 2
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
77 changes: 77 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
module.exports = {
root: true,
globals: {
'TwitchJs': true,
},
env: {
browser: true,
es2024: true,
node: true,
},
parser: 'vue-eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
parser: '@typescript-eslint/parser',
project: ['./tsconfig.json', './libs/**/tsconfig.json', './packages/**/tsconfig.json'],
sourceType: 'module',
extraFileExtensions: ['.vue'],
},
ignorePatterns: [
'node_modules/**',
'**/dist/**',
'types/**',
'commitlint.config.js',
'stylelint.config.js',
],
extends: [
'airbnb-base',
'airbnb-typescript/base',
'plugin:@typescript-eslint/strict-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:unicorn/all',
'prettier',
],
plugins: [
'@typescript-eslint',
'import',
'deprecation',
'prettier',
'unicorn',
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx']
},
'import/resolver': {
node: { extensions: ['.js', '.mjs'] },
typescript: {},
},
},
rules: {
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }],
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^(_)|(of)|(returns)|(type)' }],
'@typescript-eslint/lines-between-class-members': 'off',
'comma-dangle': ['warn', 'always-multiline'],
'deprecation/deprecation': 'warn',
'import/no-extraneous-dependencies': ['error', { devDependencies: true, optionalDependencies: false, peerDependencies: false, bundledDependencies: false }],
'import/prefer-default-export': 'off',
'max-len': 'off',
'no-console': 'off',
'no-restricted-syntax': [
'error',
{ selector: 'ForInStatement', message: 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.' },
{ selector: 'LabeledStatement', message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.' },
{ selector: 'WithStatement', message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.' },
],
'no-underscore-dangle': 'off',
'no-void': 'off',
'prettier/prettier': 'error',
semi: ['error', 'always'],
'unicorn/filename-case': 'off',
'unicorn/prevent-abbreviations': ['error', { allowList: { btn: true, BtnData: true, prop: true, props: true, ref: true, refs: true } }],
},
};
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"editorconfig": true,
"printWidth": 160,
"semi": true,
"singleQuote": true,
"trailingComma": "all"
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
}
15 changes: 0 additions & 15 deletions .vscode/launch.json

This file was deleted.

13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Quote Overlay</title>
</head>
<body>
<div id="app"></div>
<script src="//unpkg.com/twitch-js"></script>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
58 changes: 58 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"name": "quote",
"version": "1.0.0",
"private": true,
"type": "module",
"main": "dist/index.js",
"tsup": {
"entry": [
"src/index.ts"
],
"format": [
"esm"
],
"sourcemap": true,
"clean": true,
"target": "esnext",
"publicDir": "./public"
},
"scripts": {
"dev": "vite",
"build": "vue-tsc && vite build",
"preview": "vite preview",
"start": "serve dist",
"lint": "pnpm lint:js",
"lint:js": "eslint --ext .js,.ts,.vue src",
"typecheck": "tsc --noEmit -p tsconfig.json"
},
"dependencies": {
"type-fest": "^4.2.0",
"vue": "^3.3.4"
},
"devDependencies": {
"@types/node": "^20.5.0",
"@typescript-eslint/eslint-plugin": "^6.4.0",
"@typescript-eslint/parser": "^6.4.0",
"@vitejs/plugin-vue": "^4.3.1",
"eslint": "^8.47.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-import-resolver-typescript": "^3.6.0",
"eslint-plugin-deprecation": "^1.5.0",
"eslint-plugin-import": "npm:eslint-plugin-i@2.28.0-2",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-unicorn": "^48.0.1",
"postcss-load-config": "^4.0.1",
"postcss-nested": "^6.0.1",
"prettier": "^3.0.2",
"serve": "^14.2.0",
"tsup": "^7.2.0",
"twitch-js": "2.0.0-beta.45",
"typescript": "^5.1.6",
"vite": "^4.4.9",
"vue-eslint-parser": "^9.3.1",
"vue-tsc": "^1.8.8"
}
}
Loading