-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ddbea9b
commit ce9ea86
Showing
1,728 changed files
with
2,245,206 additions
and
1,613,882 deletions.
There are no files selected for viewing
This file contains 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,13 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Matches multiple files with brace expansion notation | ||
[*.{js,jsx,ts,tsx,json,css,md,html,vue}] | ||
charset = utf-8 | ||
indent_style = tab | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains 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,11 @@ | ||
node_modules | ||
built/* | ||
bundler/* | ||
coverage/* | ||
*.min.js | ||
.editorconfig | ||
.vscode | ||
mods/**/src/** | ||
.DS_Store | ||
/webpack/* | ||
/web/* |
This file contains 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,30 +1,30 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
node: true, | ||
jquery: true, | ||
}, | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaVersion: 13, | ||
sourceType: "module", | ||
}, | ||
plugins: ["@typescript-eslint"], | ||
rules: { | ||
// Basic code style rules | ||
indent: ["error", 2], // Use 2 spaces for indentation | ||
"linebreak-style": ["error", "unix"], // Use Unix line endings | ||
quotes: ["error", "double"], // Use single quotes for strings | ||
semi: ["error", "always"], // Require semicolons at the end of statements | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
node: true, | ||
jquery: true | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 13, | ||
sourceType: 'module' | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
rules: { | ||
// Basic code style rules | ||
indent: ['error', 'tab'], | ||
'linebreak-style': ['error', 'unix'], // Use Unix line endings | ||
quotes: ['error', 'single', { allowTemplateLiterals: true }], // Use single quotes for strings | ||
semi: ['error', 'always'], // Require semicolons at the end of statements | ||
|
||
// TypeScript specific rules | ||
"@typescript-eslint/no-unused-vars": "off", // Turn off unused variable warnings | ||
"@typescript-eslint/no-empty-function": "off", // Allow empty functions | ||
"@typescript-eslint/no-var-requires": "off", // Allow 'require' statements | ||
"@typescript-eslint/no-this-alias": "off", // Allow using 'this' alias | ||
"no-fallthrough": "off", // Allow fallthrough in switch statements | ||
"no-prototype-builtins": "off", // Allow prototype built-ins | ||
"no-cond-assign": "off", // Allow assignment in conditional expressions | ||
}, | ||
// TypeScript specific rules | ||
'@typescript-eslint/no-unused-vars': 'off', // Turn off unused variable warnings | ||
'@typescript-eslint/no-empty-function': 'off', // Allow empty functions | ||
'@typescript-eslint/no-var-requires': 'off', // Allow 'require' statements | ||
'@typescript-eslint/no-this-alias': 'off', // Allow using 'this' alias | ||
'no-fallthrough': 'off', // Allow fallthrough in switch statements | ||
'no-prototype-builtins': 'off', // Allow prototype built-ins | ||
'no-cond-assign': 'off' // Allow assignment in conditional expressions | ||
} | ||
}; |
This file contains 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,29 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: [ "staging","master", "feature/add-eslint" ] | ||
pull_request: | ||
branches: [ staging ,"master", "feature/add-eslint"] | ||
push: | ||
branches: ['staging', 'master', 'feature/add-eslint'] | ||
pull_request: | ||
branches: [staging, 'master', 'feature/add-eslint'] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
security-events: write | ||
lint: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
security-events: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20' | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run ESLint | ||
run: npx eslint . --config .eslintrc.js | ||
- name: Run ESLint | ||
run: npx eslint . --config .eslintrc.js |
This file contains 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,5 +1,11 @@ | ||
**/*.html | ||
**/*.css | ||
node_modules/ | ||
built/ | ||
bundler/ | ||
node_modules | ||
built/* | ||
bundler/* | ||
coverage/* | ||
*.min.js | ||
.editorconfig | ||
.vscode | ||
mods/**/src/** | ||
.DS_Store | ||
/webpack/* | ||
/web/* |
This file contains 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,7 +1,19 @@ | ||
{ | ||
"tabWidth": 2, | ||
"singleQuote": false, | ||
"semi": true, | ||
"trailingComma": "all", | ||
"printWidth": 100 | ||
"useTabs": true, | ||
"tabWidth": 4, | ||
"endOfLine": "lf", | ||
"semi": true, | ||
"singleQuote": true, | ||
"jsxSingleQuote": false, | ||
"quoteProps": "as-needed", | ||
"trailingComma": "none", | ||
"bracketSpacing": true, | ||
"jsxBracketSameLine": false, | ||
"arrowParens": "always", | ||
"insertPragma": false, | ||
"requirePragma": false, | ||
"proseWrap": "preserve", | ||
"htmlWhitespaceSensitivity": "css", | ||
"vueIndentScriptAndStyle": false, | ||
"embeddedLanguageFormatting": "auto" | ||
} |
This file contains 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,20 +1,20 @@ | ||
import S from "saito-js/saito"; | ||
import S from 'saito-js/saito'; | ||
|
||
export default async (saito) => { | ||
saito.hash = (data) => S.hash(data); | ||
// if (!saito.BROWSER) { | ||
// // eslint-disable-next-line @typescript-eslint/no-var-requires | ||
// const blake3 = require("blake3"); | ||
// saito.hash = (data) => { | ||
// return blake3.hash(data).toString("hex"); | ||
// }; | ||
// } else { | ||
// const blake3 = await import("blake3/browser"); | ||
// saito.hash = (data) => { | ||
// // console.log(blake3); | ||
// // console.log(data); | ||
// return blake3.hash(data).toString("hex"); | ||
// }; | ||
// | ||
// } | ||
saito.hash = (data) => S.hash(data); | ||
// if (!saito.BROWSER) { | ||
// // eslint-disable-next-line @typescript-eslint/no-var-requires | ||
// const blake3 = require("blake3"); | ||
// saito.hash = (data) => { | ||
// return blake3.hash(data).toString("hex"); | ||
// }; | ||
// } else { | ||
// const blake3 = await import("blake3/browser"); | ||
// saito.hash = (data) => { | ||
// // console.log(blake3); | ||
// // console.log(data); | ||
// return blake3.hash(data).toString("hex"); | ||
// }; | ||
// | ||
// } | ||
}; |
Oops, something went wrong.