-
Notifications
You must be signed in to change notification settings - Fork 439
chore: build and development improvements #478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ce59119
chore: update linters to use prettier
quoid 7b49515
chore: update basic type checks
quoid 58d6530
chore: update vite dev and build process
quoid 3a862b5
chore: set up vitest
quoid cd64127
chore: set up svelte-i18n
quoid b1b8305
chore: update extension recommendations
quoid d5e6bfd
chore: update ci
quoid bd61d40
chore: remove `postcss` and `postcssrc`
quoid 3a36c42
chore: update `env` and `parserOptions`
quoid 371a293
chore: remove comment
quoid 91bf600
chore: remove unnecessary options
quoid 8a42546
chore: change `trailingComma` option
quoid 9dfd502
chore: keep using spaces instead of tabs
quoid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| }, | ||
| "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"], | ||
|
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": { | ||
|
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" | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
|
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}} | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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"] | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.