Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

feat: build and lint using new alwatr packages #108

Open
wants to merge 15 commits into
base: next
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
max_line_length = 140

[*.{js,ts}]
block_comment_start = /**
Expand Down
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
*.js
*.mjs
*.cjs
*.d.ts
/demo/es-bench/
/uniquely/flight-finder-pwa
Expand Down
85 changes: 1 addition & 84 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,87 +1,4 @@
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/strict",
"plugin:@typescript-eslint/stylistic",
// "plugin:@typescript-eslint/strict-type-checked",
// "plugin:@typescript-eslint/stylistic-type-checked",
"plugin:import/recommended",
"plugin:import/typescript"
],
"env": {
"shared-node-browser": true,
"es2023": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": true,
"ecmaVersion": 2023,
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "import"],
"settings": {
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"ecmaVersion": 2023,
"project": ["**/tsconfig.json"],
"projectFolderIgnoreList": ["**/node_modules/**"]
},
"node": true
}
},
"rules": {
"max-len": ["error", {"code": 120}],
"no-eval": ["error", {"allowIndirect": true}],
"no-floating-decimal": "error",
"space-infix-ops": "error",
"new-cap": ["error", {"capIsNewExceptionPattern": "Mixin$"}],
"brace-style": ["error", "stroustrup", {"allowSingleLine": true}],
"indent": "off",
"@typescript-eslint/indent": [
"error",
2,
{
"SwitchCase": 1,
"VariableDeclarator": 1,
"outerIIFEBody": 1,
"MemberExpression": 1,
"FunctionDeclaration": {"parameters": 1, "body": 1},
"FunctionExpression": {"parameters": 1, "body": 1},
"CallExpression": {"arguments": 1},
"ArrayExpression": 1,
"ObjectExpression": 1,
"ImportDeclaration": 1,
"flatTernaryExpressions": false,
"ignoreComments": false,
"ignoredNodes": [
"TemplateLiteral *",
"TSTypeParameterInstantiation",
"FunctionExpression > .params[decorators.length > 0]",
"FunctionExpression > .params > :matches(Decorator, :not(:first-child))",
"ClassBody.body > PropertyDefinition[decorators.length > 0] > .key"
]
}
],
"operator-linebreak": ["error", "after", {"overrides": {"?": "before", ":": "before"}}],
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", ["parent", "sibling", "index"], "object", "unknown", "type"],
"newlines-between": "always",
"warnOnUnassignedImports": true,
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"@typescript-eslint/prefer-string-starts-ends-with": "off",
"@typescript-eslint/no-dynamic-delete": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"no-throw-literal": "off",
"require-jsdoc": "off",
"valid-jsdoc": "off"
}
"extends": "@alwatr/eslint-config"
}
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ updates:
- AliMD
schedule:
interval: weekly
time: "00:30"
day: "thursday"
time: '00:30'
day: thursday
labels:
- ci
- priority-low
Expand All @@ -28,8 +28,8 @@ updates:
- AliMD
schedule:
interval: weekly
time: "00:30"
day: "thursday"
time: '00:30'
day: thursday
labels:
- dependencies
- ci
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,9 @@ package-lock.json

# Build
dist
build
.tsbuildinfo
*.map
*.d.ts
*.js
!*.config.js
!**/res/*.js

# Output of 'npm pack'
*.tgz
Expand Down
4 changes: 0 additions & 4 deletions .prettierrc.json

This file was deleted.

65 changes: 39 additions & 26 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
{
"npm.packageManager": "yarn",
"editor.wordWrapColumn": 120,
"editor.formatOnPaste": false,
"editor.formatOnSave": false,
"cSpell.language": "en,fa,fa-IR",
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.useEditorConfig": true,
"files.exclude": {
"**/*.map": true,
"**/*.d.ts": true,
"**/*.tsbuildinfo": true
"editor.formatOnPaste": false,
"editor.formatOnSave": false,
"editor.wordWrapColumn": 120,
"eslint.nodePath": ".yarn/sdks",
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
"*.js": "${capture}.js.map, ${capture}.min.js, ${capture}.d.ts, ${capture}.d.ts.map",
"*.ts": "${capture}.js, ${capture}.js.map, ${capture}.d.ts, ${capture}.d.ts.map",
"tsconfig.json": "tsconfig.*.json, .tsbuildinfo"
},
"files.associations": {
"*.mt": "routeros",
"*.conf.template": "nginx",
"ssh_config": "ssh_config",
"*.njk": "html",
"ssh-config": "ssh_config"
"*.ajs": "json",
"*.ajs.bk": "json",
"*.conf.template": "nginx"
},
"files.exclude": {
// "**/*.map": true,
// "**/*.d.ts": true,
// "**/*.tsbuildinfo": true
},
"markdownlint.ignore": [
"**/CHANGELOG.md"
],
"cSpell.language": "en,fa,fa-IR",
"cSpell.words": [
"Alwatr"
],
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"git.autoStash": true,
"git.branchProtection": [
"main",
Expand All @@ -37,11 +34,27 @@
"main",
"next"
],
"markdownlint.ignore": [
"**/CHANGELOG.md"
],
"npm.packageManager": "yarn",
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
"prettier.useEditorConfig": true,
"search.exclude": {
"**/.pnp.*": true,
"**/.yarn": true,
"**/.pnp.*": true
"**/*.lock": true
},
"eslint.nodePath": ".yarn/sdks",
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
"typescript.enablePromptUseWorkspaceTsdk": true
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"cSpell.words": [
"alwatr",
"deno",
"flatomise",
"nanolib",
"outdir",
"outfile",
"tsbuildinfo",
"typeof"
]
}
20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/bin/eslint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/bin/eslint.js
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint/bin/eslint.js your application uses
module.exports = absRequire(`eslint/bin/eslint.js`);
20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/lib/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint your application uses
module.exports = absRequire(`eslint`);
20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/lib/unsupported-api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/use-at-your-own-risk
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint/use-at-your-own-risk your application uses
module.exports = absRequire(`eslint/use-at-your-own-risk`);
20 changes: 20 additions & 0 deletions .yarn/sdks/typescript/lib/tsc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsc.js
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/lib/tsc.js your application uses
module.exports = absRequire(`typescript/lib/tsc.js`);
Loading
Loading