-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
9 changed files
with
3,465 additions
and
0 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,14 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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,16 @@ | ||
name: build-test-lint | ||
on: push | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v4 | ||
- name: use node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
- run: npm install | ||
- run: npx tsc --build --clean | ||
- run: npm run test | ||
- run: npx eslint |
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,7 @@ | ||
node_modules | ||
.yarn | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
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,2 @@ | ||
name: social-links-bot | ||
version: 0.0.1 |
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,88 @@ | ||
import eslint from "@eslint/js"; | ||
import tseslint from "typescript-eslint"; | ||
import stylistic from '@stylistic/eslint-plugin' | ||
import vitest from "@vitest/eslint-plugin" | ||
|
||
export default tseslint.config( | ||
eslint.configs.recommended, | ||
...tseslint.configs.strictTypeChecked, | ||
...tseslint.configs.stylisticTypeChecked, | ||
stylistic.configs.customize({ | ||
indent: 4, | ||
quotes: "double", | ||
semi: true, | ||
quoteProps: "consistent-as-needed", | ||
braceStyle: "1tbs", | ||
}), | ||
{ | ||
files: ["**/*.test.ts"], | ||
plugins: { | ||
vitest | ||
}, | ||
rules: { | ||
...vitest.configs.recommended.rules, | ||
'vitest/valid-title': 'warn', | ||
'vitest/no-commented-out-tests': 'warn' | ||
} | ||
}, | ||
{ | ||
files: ["**/*.ts", "**/*.tsx"], | ||
|
||
languageOptions: { | ||
parserOptions: { | ||
project: "./tsconfig.json", | ||
tsconfigRootDir: import.meta.dirname, | ||
}, | ||
}, | ||
|
||
rules: { | ||
// Extra rules | ||
"eqeqeq": ["error", "always", { | ||
null: "ignore", | ||
}], | ||
"no-self-compare": "error", | ||
"no-template-curly-in-string": "error", | ||
"no-useless-assignment": "error", | ||
"no-nested-ternary": "error", | ||
"no-return-assign": "error", | ||
"no-sequences": "error", | ||
"no-var": "error", | ||
"arrow-body-style": ["error", "as-needed"], | ||
"func-style": ["error", "declaration", { | ||
allowArrowFunctions: true, | ||
}], | ||
"curly": ["error", "all"], | ||
"object-shorthand": ["error", "always"], | ||
"operator-assignment": ["error", "always"], | ||
"camelcase": ["error", { | ||
properties: "always", | ||
}], | ||
|
||
// Rules I don't want | ||
"@typescript-eslint/restrict-template-expressions": "off", | ||
|
||
// Extra code styling rules | ||
"@stylistic/array-bracket-newline": ["error", "consistent"], | ||
"@stylistic/array-element-newline": ["error", "consistent"], | ||
"@stylistic/func-call-spacing": ["error", "never"], | ||
"@stylistic/function-paren-newline": ["error", "multiline"], | ||
"@stylistic/implicit-arrow-linebreak": ["error", "beside"], | ||
|
||
"@stylistic/object-curly-newline": ["error", { | ||
multiline: true, | ||
consistent: true, | ||
}], | ||
|
||
"@stylistic/object-property-newline": ["error", { | ||
allowAllPropertiesOnSameLine: true, | ||
}], | ||
|
||
"@stylistic/operator-linebreak": ["off"], | ||
"@stylistic/semi-style": ["error", "last"], | ||
"@stylistic/space-before-function-paren": ["error", "always"], | ||
}, | ||
}, | ||
{ | ||
ignores: ["**/node_modules", "**/dist", "eslint.config.mjs", "**/difflib"], | ||
}, | ||
); |
Oops, something went wrong.