Skip to content
Closed
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
10 changes: 0 additions & 10 deletions .editorconfig

This file was deleted.

186 changes: 106 additions & 80 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,82 +1,108 @@
{
"env": {
"browser": true,
"node": true,
"es2021": true,
"es2022": true,
"webextensions": true
},
Comment thread
ACTCD marked this conversation as resolved.
"extends": ["eslint:recommended", "airbnb-base"],
"globals": {
"_browser": "writable",
"browser": "readonly"
},
"ignorePatterns": [
"/etc",
"build",
"dist",
"node_modules"
],
"overrides": [
{
"files": ["*.svelte"],
"processor": "svelte3/svelte3"
}
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["svelte3"],
"rules": {
"array-callback-return": "off",
"arrow-body-style": "off",
"arrow-parens": ["error", "as-needed"],
"comma-dangle": ["error", "never"],
"consistent-return": "off",
"default-case": "off",
"eqeqeq": ["error", "smart"],
"global-require": "off",
"guard-for-in": "warn",
"import/extensions": "off",
"import/first": "off",
"import/no-mutable-exports": "off",
"import/no-extraneous-dependencies": ["error", {
"devDependencies": true
}],
"import/prefer-default-export": "off",
"import/no-unresolved": "off",
"indent": ["error", 4, {"SwitchCase": 1}],
"max-len": "off",
"no-alert":"off",
"no-await-in-loop":"warn",
"no-confusing-arrow": ["warn", {
"allowParens": true,
"onlyOneSimpleParam": true
}],
"no-console": ["warn", {"allow": ["info", "warn", "error"]}],
"no-continue": "off",
"no-else-return": ["error", {"allowElseIf": true}],
"no-nested-ternary": "off",
"no-param-reassign": ["warn", { "props": false }],
"no-plusplus": "off",
"no-restricted-syntax": "off",
"no-return-assign": "off",
"no-underscore-dangle":"off",
"no-unused-expressions": "off",
"no-use-before-define": ["error", {
"functions": false,
"classes": true,
"variables": true,
"allowNamedExports": false
}],
"object-curly-newline": ["error", {"consistent": true}],
"object-curly-spacing": ["error", "never"],
"one-var": "off",
"one-var-declaration-per-line": "off",
"prefer-destructuring": "off",
"prefer-object-spread": "warn",
"quotes": ["error", "double"],
"import/no-namespace": "warn"
}
"env": {
"browser": true,
"es2021": true,
"es2022": true,
"node": true,
"webextensions": true
},
"extends": ["prettier"],
Comment thread
ACTCD marked this conversation as resolved.
"globals": {
"browser": "readonly",
"webkit": "readonly"
},
"ignorePatterns": ["node_modules", "xcode"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"overrides": [
{
"files": ["*.svelte"],
"parser": "svelte-eslint-parser"
}
],
"plugins": ["prettier"],
"rules": {
Comment thread
ACTCD marked this conversation as resolved.
"curly": ["error", "multi-line"],
"eqeqeq": ["error", "smart"],
"max-len": [
"error",
{
"code": 80,
"ignoreRegExpLiterals": true,
"tabWidth": 4
}
],
"no-bitwise": "error",
"no-console": [1, {"allow": ["error", "info", "warn"]}],
"no-duplicate-imports": "error",
"no-mixed-operators": "error",
"no-multi-str": "error",
"no-restricted-syntax": [
"error",
{
"selector": "VariableDeclaration[kind='var'][declare!=true]",
"message": "Unexpected var, use let or const instead."
}
],
"no-useless-concat": "error",
"no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_"
}
],
"no-undef": "error",
"no-use-before-define": [
"error",
{
"classes": true,
"functions": false,
"variables": true
}
],
"no-var": "off",
"operator-assignment": ["error", "always"],
"padding-line-between-statements": [
"error",
// {
// "blankLine": "always",
// "prev": "*",
// "next": ["return", "throw"]
// },
// {
// "blankLine": "always",
// "prev": ["const", "let", "var"],
// "next": "*"
// },
// {
// "blankLine": "any",
// "prev": ["const", "let", "var"],
// "next": ["const", "let", "var"]
// },
{
"blankLine": "always",
"prev": ["directive", "import"],
"next": "*"
},
{
"blankLine": "any",
"prev": ["directive", "import"],
"next": ["directive", "import"]
}
],
"prefer-const": "error",
"prefer-template": "error",
"quotes": [
"error",
"double",
{"allowTemplateLiterals": false, "avoidEscape": true}
],
"prettier/prettier": "error"
}
}
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI
on:
pull_request:
push:
branches:
- main
- "v*"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 19
- name: Install dependencies
run: npm install
- name: Lint CSS
run: npm run lint:css
- name: Lint JavaScript
run: npm run lint:js
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 19
- name: Install dependencies
run: npm install
- name: Run Tests
run: npm run test
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 19
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
14 changes: 0 additions & 14 deletions .github/workflows/lint.yml

This file was deleted.

9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ ehthumbs.db
Thumbs.db

# xcode
xcuserdata/
*.xcuserstate
*.dev.xcconfig
*.xcuserstate
**/Safari-Extension/Resources/*.html
**/Safari-Extension/Resources/*.js
**/Safari-Extension/Resources/assets/**/*
XCBuildData
xcode/**/build/
xcode/**/dist/
# xcode/Userscripts-iOS/Base.lproj/Main.html
xcuserdata/
# xcode/Userscripts-iOS/Base.lproj/Main.html
5 changes: 0 additions & 5 deletions .postcssrc.json

This file was deleted.

15 changes: 15 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
!.env.example
.DS_Store
.env
.env.*
*.png
*.svg
/build
/package
node_modules
xcode

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
Comment thread
ACTCD marked this conversation as resolved.
"bracketSpacing": false,
"plugins": ["prettier-plugin-svelte"],
"tabWidth": 4,
"overrides": [
{"files": "*.svelte", "options": {"parser": "svelte"}},
{"files": "*.yml", "options": {"tabWidth": 2, "useTabs": false}}
]
}
64 changes: 37 additions & 27 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
{
"extends": [
"stylelint-config-recommended",
"stylelint-config-standard",
"stylelint-config-html/svelte"
],
"ignoreFiles": [
"**/build/**",
"**/dist/**",
"**/etc/**",
"**/node_modules/**",
"**/reset.css"
],
"rules": {
"alpha-value-notation": "number",
"comment-empty-line-before": ["always",{
"ignore": ["after-comment", "stylelint-commands"]
}],
"custom-property-empty-line-before": null,
"indentation": 4,
"max-empty-lines": 1,
"no-descending-specificity": null,
"property-no-vendor-prefix": null,
"selector-class-pattern": null,
"selector-pseudo-class-no-unknown": [true, {
"ignorePseudoClasses": ["global"]
}]
}
"extends": [
"stylelint-config-standard",
"stylelint-prettier/recommended",
"stylelint-config-prettier"
],
"ignoreFiles": [
"**/node_modules/**",
"**/reset.css",
"xcode/**/*"
],
"plugins": ["stylelint-order"],
"rules": {
"alpha-value-notation": "number",
"custom-property-empty-line-before": "never",
"declaration-block-no-duplicate-properties": true,
"order/properties-alphabetical-order": true,
"property-no-vendor-prefix": true,
"selector-class-pattern": [
"^[a-z]([-]?[a-z0-9]+)*(__[a-z0-9]([-]?[a-z0-9]+)*)?(--[a-z0-9]([-]?[a-z0-9]+)*)?$",
{
"resolveNestedSelectors": true,
"message": "Expected class selector to match BEM CSS pattern https://en.bem.info/methodology/css. Regex examples: https://regex101.com/r/DhEhbS/1"
}
],
"selector-pseudo-class-no-unknown": [
true,
{
"ignorePseudoClasses": ["global"]
}
]
},
"overrides": [
{
"customSyntax": "postcss-html",
"files": ["**/*svelte"]
}
]
}
8 changes: 5 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
// See https://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"svelte.svelte-vscode",
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint"
"esbenp.prettier-vscode",
"lokalise.i18n-ally",
"stylelint.vscode-stylelint",
"svelte.svelte-vscode"
]
}
}
Loading