Skip to content
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

feat: v2 preparations #680

Merged
merged 17 commits into from
May 12, 2024
Merged
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
5 changes: 0 additions & 5 deletions .babelrc

This file was deleted.

Empty file removed .coveralls.yml
Empty file.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

105 changes: 94 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,97 @@
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended'
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:jest/recommended',
'plugin:prettier/recommended',
],
plugins: ['@typescript-eslint', 'jest', 'prettier'],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
env: {
node: true,
es6: true,
jest: true,
},
rules: {
'class-methods-use-this': 'off',
'import/prefer-default-export': 'off',
'eol-last': ['error', 'always'],
'newline-before-return': 'error',
'import/extensions': 0,
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: false,
optionalDependencies: false,
peerDependencies: false,
},
],
parserOptions: {
ecmaVersion: 2019,
sourceType: 'module'
'no-restricted-imports': 'error',
'semi': 'error',
'comma-dangle': 'off',
'@typescript-eslint/comma-dangle': ['error', 'always-multiline'],
'quotes': 'off',
'@typescript-eslint/quotes': [
'error',
'single',
{
allowTemplateLiterals: true,
},
],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'arrow-parens': ['error', 'always'],
'indent': 'off',
'@typescript-eslint/indent': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
},
],
'spaced-comment': ['error', 'always'],
'no-multiple-empty-lines': [
'error',
{
max: 2,
maxEOF: 0,
},
],
'import/order': [
'error',
{
'groups': [['external', 'internal', 'builtin'], ['sibling', 'parent'], 'index', 'object'],
'pathGroupsExcludedImportTypes': ['builtin'],
'newlines-between': 'always',
'alphabetize': {
order: 'asc',
caseInsensitive: true,
},
},
],
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.ts', '.jsx', '.tsx'],
},
},
},
overrides: [
{
files: ['playground/**/*.ts'],
rules: {
'import/no-extraneous-dependencies': ['off'],
},
},
rules: {
'@typescript-eslint/member-delimiter-style': ['off'],
'@typescript-eslint/ban-ts-ignore': ['off']
}
};
],
};
44 changes: 0 additions & 44 deletions .github/workflows/build.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/on-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on: [push]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node: [18, 20]

name: Build (node v${{ matrix.node }})
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Install
run: npm install

- name: lint
run: npm run lint

- name: typecheck
run: npx tsc --noEmit
12 changes: 2 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,7 @@ node_modules/
# dotenv environment variables file
.env
.env.test

# VS Code settings
.vscode/
.env.local

# Build directories
server/dist
public/dist

benchmark/webserver.js

# Compiled templates
templates/compiled
dist
11 changes: 11 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
printWidth: 120
tabWidth: 2
useTabs: false
semi: true
singleQuote: true
trailingComma: all
bracketSpacing: true
bracketSameLine: false
arrowParens: always
quoteProps: consistent
endOfLine: lf
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 18.18.0
17 changes: 17 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.formatOnSave": true,
"editor.trimAutoWhitespace": true,
"files.insertFinalNewline": true,
"files.encoding": "utf8",
"typescript.tsdk": "node_modules/typescript/lib",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"typescript.preferences.importModuleSpecifier": "relative",
"prettier.prettierPath": "./node_modules/prettier"
}
Loading
Loading