mirror of
https://github.com/logos-messaging/js-rln.git
synced 2026-01-02 13:43:06 +00:00
adjust config
This commit is contained in:
parent
65b7d8bcbc
commit
291189e4a4
@ -45,4 +45,4 @@
|
||||
}
|
||||
],
|
||||
"ignoreRegExpList": ["import"]
|
||||
}
|
||||
}
|
||||
@ -2,19 +2,10 @@
|
||||
"root": true,
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"project": "./tsconfig.dev.json"
|
||||
"project": ["./tsconfig.json"]
|
||||
},
|
||||
"env": {
|
||||
"es6": true
|
||||
},
|
||||
"ignorePatterns": [
|
||||
"node_modules",
|
||||
"build",
|
||||
"coverage",
|
||||
"proto",
|
||||
"*/**/credential_validation_generated.ts",
|
||||
"*/**/keystore_validation_generated.ts"
|
||||
],
|
||||
"env": { "es6": true },
|
||||
"ignorePatterns": ["node_modules", "build", "coverage", "proto"],
|
||||
"plugins": ["import", "eslint-comments", "functional"],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
@ -23,18 +14,15 @@
|
||||
"plugin:import/typescript",
|
||||
"plugin:prettier/recommended"
|
||||
],
|
||||
"globals": {
|
||||
"BigInt": true,
|
||||
"console": true,
|
||||
"WebAssembly": true
|
||||
},
|
||||
"globals": { "BigInt": true, "console": true, "WebAssembly": true },
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": [
|
||||
"prettier/prettier": [
|
||||
"error",
|
||||
{
|
||||
"allowExpressions": true
|
||||
"trailingComma": "none"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
"eslint-comments/disable-enable-pair": [
|
||||
"error",
|
||||
@ -52,26 +40,63 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"no-constant-condition": [
|
||||
"no-constant-condition": ["error", { "checkLoops": false }],
|
||||
"import/no-extraneous-dependencies": [
|
||||
"error",
|
||||
{
|
||||
"checkLoops": false
|
||||
"devDependencies": [
|
||||
"**/*.test.ts",
|
||||
"**/*.spec.ts",
|
||||
"**/tests/**",
|
||||
"**/rollup.config.js",
|
||||
"**/playwright.config.ts",
|
||||
"**/.eslintrc.cjs",
|
||||
"**/karma.conf.cjs"
|
||||
]
|
||||
}
|
||||
],
|
||||
"sort-imports": [
|
||||
"error",
|
||||
{
|
||||
"ignoreDeclarationSort": true,
|
||||
"ignoreCase": true
|
||||
}
|
||||
]
|
||||
{ "ignoreDeclarationSort": true, "ignoreCase": true }
|
||||
],
|
||||
"no-console": "error",
|
||||
"@typescript-eslint/no-floating-promises": "error",
|
||||
"@typescript-eslint/await-thenable": "error",
|
||||
"@typescript-eslint/no-misused-promises": "error",
|
||||
"@typescript-eslint/no-explicit-any": "warn",
|
||||
"id-match": ["error", "^(?!.*[pP]ubSub)"]
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.spec.ts", "**/test_utils/*.ts"],
|
||||
"files": ["*.spec.ts", "**/test_utils/*.ts", "*.js", "*.cjs"],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-non-null-assertion": "off"
|
||||
"@typescript-eslint/no-non-null-assertion": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"no-console": "off",
|
||||
"import/no-extraneous-dependencies": [
|
||||
"error",
|
||||
{
|
||||
"devDependencies": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.mts", "*.cts", "*.tsx"],
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-function-return-type": [
|
||||
"error",
|
||||
{
|
||||
"allowExpressions": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["**/ci/*.js"],
|
||||
"rules": {
|
||||
"no-undef": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1,68 +1,49 @@
|
||||
process.env.CHROME_BIN = require("puppeteer").executablePath();
|
||||
const webpack = require("webpack");
|
||||
const playwright = require('playwright');
|
||||
|
||||
const os = require("os");
|
||||
const path = require("path");
|
||||
const ResolveTypeScriptPlugin = require("resolve-typescript-plugin");
|
||||
|
||||
const output = {
|
||||
path:
|
||||
path.join(os.tmpdir(), "_karma_webpack_") +
|
||||
Math.floor(Math.random() * 1000000),
|
||||
};
|
||||
process.env.CHROME_BIN = playwright.chromium.executablePath();
|
||||
process.env.FIREFOX_BIN = playwright.firefox.executablePath();
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
frameworks: ["webpack", "mocha"],
|
||||
files: ["src/**/!(node).spec.ts"],
|
||||
preprocessors: {
|
||||
"**/*.ts": ["webpack"],
|
||||
"src/**/!(node).spec.ts": ["webpack"]
|
||||
},
|
||||
|
||||
files: [
|
||||
"src/**/*.spec.ts",
|
||||
"src/**/*.ts",
|
||||
{
|
||||
pattern: `${output.path}/**/*`,
|
||||
watched: false,
|
||||
included: false,
|
||||
served: true,
|
||||
},
|
||||
],
|
||||
envPreprocessor: ["CI"],
|
||||
reporters: ["progress"],
|
||||
browsers: ["ChromeHeadless"],
|
||||
pingTimeout: 60000,
|
||||
browsers: ["ChromeHeadless", "FirefoxHeadless"],
|
||||
singleRun: true,
|
||||
client: {
|
||||
mocha: {
|
||||
timeout: 60000, // Default is 2s
|
||||
},
|
||||
timeout: 6000 // Default is 2s
|
||||
}
|
||||
},
|
||||
webpack: {
|
||||
mode: "production",
|
||||
resolve: {
|
||||
// Add `.ts` and `.tsx` as a resolvable extension.
|
||||
extensions: [".ts", ".tsx", ".js"],
|
||||
plugins: [new ResolveTypeScriptPlugin()],
|
||||
},
|
||||
mode: "development",
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.wasm$/,
|
||||
type: "asset/resource",
|
||||
},
|
||||
{
|
||||
test: /\.(js|tsx?)$/,
|
||||
loader: "ts-loader",
|
||||
exclude: /node_modules|\.d\.ts$/,
|
||||
options: { configFile: "tsconfig.karma.json" },
|
||||
},
|
||||
{
|
||||
test: /\.d\.ts$/,
|
||||
loader: "ignore-loader",
|
||||
},
|
||||
],
|
||||
rules: [{ test: /\.([cm]?ts|tsx)$/, loader: "ts-loader" }]
|
||||
},
|
||||
output,
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
"process.env.CI": process.env.CI || false,
|
||||
"process.env.DISPLAY": "Browser",
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
process: "process/browser.js"
|
||||
})
|
||||
],
|
||||
resolve: {
|
||||
extensions: [".ts", ".tsx", ".js"],
|
||||
extensionAlias: {
|
||||
".js": [".js", ".ts"],
|
||||
".cjs": [".cjs", ".cts"],
|
||||
".mjs": [".mjs", ".mts"]
|
||||
}
|
||||
},
|
||||
stats: { warnings: false },
|
||||
devtool: "inline-source-map"
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
2667
package-lock.json
generated
2667
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
40
package.json
40
package.json
@ -29,11 +29,9 @@
|
||||
"build:bundle": "rollup --config rollup.config.js",
|
||||
"size": "npm run build && size-limit",
|
||||
"fix": "run-s fix:*",
|
||||
"fix:prettier": "prettier \"src/**/*.ts\" \"./*.json\" \"*.*js\" \".github/**/*.yml\" --write",
|
||||
"fix:lint": "eslint src --ext .ts --ext .cjs --fix",
|
||||
"test": "run-s test:*",
|
||||
"test:lint": "eslint src --ext .ts",
|
||||
"test:prettier": "prettier \"src/**/*.ts\" \"./*.json\" \"*.*js\" \".github/**/*.yml\" --list-different",
|
||||
"test:spelling": "cspell \"{*.md,.github/*.md,src/**/*.ts}\"",
|
||||
"test:tsc": "tsc -p tsconfig.dev.json",
|
||||
"test:browser": "karma start karma.conf.cjs",
|
||||
@ -70,9 +68,8 @@
|
||||
"@types/node": "^17.0.6",
|
||||
"@types/tail": "^2.0.0",
|
||||
"@types/uuid": "^8.3.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.8.1",
|
||||
"@typescript-eslint/parser": "^5.8.1",
|
||||
"@waku/core": "^0.0.25",
|
||||
"@typescript-eslint/eslint-plugin": "^6.6.0",
|
||||
"@typescript-eslint/parser": "^6.21.0",
|
||||
"@waku/interfaces": "^0.0.20",
|
||||
"@waku/message-encryption": "^0.0.23",
|
||||
"@web/rollup-plugin-import-meta-assets": "^1.0.7",
|
||||
@ -85,12 +82,12 @@
|
||||
"chai-subset": "^1.6.0",
|
||||
"cspell": "^5.14.0",
|
||||
"deep-equal-in-any-order": "^2.0.6",
|
||||
"eslint": "^8.6.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-functional": "^4.0.2",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"eslint-plugin-functional": "^6.0.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-prettier": "^5.0.1",
|
||||
"fast-check": "^2.25.0",
|
||||
"gh-pages": "^3.2.3",
|
||||
"husky": "^7.0.4",
|
||||
@ -98,17 +95,18 @@
|
||||
"isomorphic-fetch": "^3.0.0",
|
||||
"jsdom": "^19.0.0",
|
||||
"jsdom-global": "^3.0.2",
|
||||
"karma": "^6.3.12",
|
||||
"karma-chrome-launcher": "^3.1.0",
|
||||
"karma": "^6.4.2",
|
||||
"karma-chrome-launcher": "^3.2.0",
|
||||
"karma-firefox-launcher": "^2.1.2",
|
||||
"karma-mocha": "^2.0.1",
|
||||
"karma-webpack": "^5.0.0",
|
||||
"karma-webkit-launcher": "^2.4.0",
|
||||
"karma-webpack": "github:codymikol/karma-webpack#2337a82beb078c0d8e25ae8333a06249b8e72828",
|
||||
"lint-staged": "^13.0.3",
|
||||
"mocha": "10.1.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"p-timeout": "^4.1.0",
|
||||
"prettier": "^2.1.1",
|
||||
"playwright": "^1.40.1",
|
||||
"process": "^0.11.10",
|
||||
"puppeteer": "^13.0.1",
|
||||
"resolve-typescript-plugin": "^1.2.0",
|
||||
"rollup": "^2.75.0",
|
||||
"rollup-plugin-copy": "^3.4.0",
|
||||
@ -116,8 +114,8 @@
|
||||
"tail": "^2.2.0",
|
||||
"ts-loader": "^9.3.1",
|
||||
"ts-node": "^10.9.1",
|
||||
"typedoc": "^0.23.10",
|
||||
"typescript": "^4.5.5"
|
||||
"typedoc": "^0.25.7",
|
||||
"typescript": "^5.3.2"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
@ -133,19 +131,17 @@
|
||||
"lint-staged": {
|
||||
"*.ts": [
|
||||
"eslint --fix"
|
||||
],
|
||||
"*.{ts,md,json,conf*.*js}": [
|
||||
"prettier --write"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@chainsafe/bls-keystore": "^3.0.0",
|
||||
"@waku/core": "^0.0.25",
|
||||
"@waku/utils": "^0.0.13",
|
||||
"@waku/zerokit-rln-wasm": "^0.0.13",
|
||||
"debug": "^4.3.4",
|
||||
"ethereum-cryptography": "^2.1.2",
|
||||
"ethers": "^5.7.2",
|
||||
"lodash": "^4.17.21",
|
||||
"rlnjs": "^3.2.3",
|
||||
"uuid": "^9.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,8 @@
|
||||
{
|
||||
"extends": "./tsconfig",
|
||||
"compilerOptions": {
|
||||
"module": "esnext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"noEmit": true
|
||||
},
|
||||
"exclude": []
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,18 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"incremental": true,
|
||||
"target": "es2020",
|
||||
"outDir": "dist/",
|
||||
"rootDir": "src",
|
||||
"moduleResolution": "node16",
|
||||
"module": "es2020",
|
||||
"target": "ES2022",
|
||||
"moduleResolution": "Bundler",
|
||||
"module": "ES2022",
|
||||
"declaration": true,
|
||||
"allowJs": true,
|
||||
"sourceMap": true,
|
||||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
||||
"resolveJsonModule": true /* Include modules imported with .json extension. */,
|
||||
"tsBuildInfoFile": "dist/.tsbuildinfo",
|
||||
"strict": true /* Enable all strict type-checking options. */,
|
||||
|
||||
/* Strict Type-Checking Options */
|
||||
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
|
||||
"strictNullChecks": true /* Enable strict null checks. */,
|
||||
@ -20,30 +17,34 @@
|
||||
"strictPropertyInitialization": true /* Enable strict checking of property initialization in classes. */,
|
||||
"noImplicitThis": true /* Raise error on 'this' expressions with an implied 'any' type. */,
|
||||
"alwaysStrict": true /* Parse in strict mode and emit "use strict" for each source file. */,
|
||||
|
||||
/* Additional Checks */
|
||||
"noUnusedLocals": true /* Report errors on unused locals. */,
|
||||
"noUnusedParameters": true /* Report errors on unused parameters. */,
|
||||
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
|
||||
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
|
||||
/* Debugging Options */
|
||||
"traceResolution": false /* Report module resolution log messages. */,
|
||||
"listEmittedFiles": false /* Print names of generated files part of the compilation. */,
|
||||
"listFiles": false /* Print names of files part of the compilation. */,
|
||||
"pretty": true /* Stylize errors and messages using color and context. */,
|
||||
|
||||
// Due to broken types in indirect dependencies
|
||||
"skipLibCheck": true,
|
||||
"allowJs": true,
|
||||
|
||||
/* Experimental Options */
|
||||
// "experimentalDecorators": true /* Enables experimental support for ES7 decorators. */,
|
||||
// "emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */,
|
||||
"lib": ["es2020", "dom"],
|
||||
|
||||
"lib": ["es2022", "dom"],
|
||||
"types": ["node", "mocha"],
|
||||
"typeRoots": ["node_modules/@types", "src/types"]
|
||||
"typeRoots": ["node_modules/@types"]
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["src/**/*.spec.ts", "src/test_utils"],
|
||||
"compileOnSave": false,
|
||||
"ts-node": {
|
||||
"files": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user