Skip to content
Open
Show file tree
Hide file tree
Changes from 13 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
1 change: 0 additions & 1 deletion js-client/.eslintignore

This file was deleted.

43 changes: 0 additions & 43 deletions js-client/.eslintrc.base.json

This file was deleted.

2 changes: 2 additions & 0 deletions js-client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ testem.log
Thumbs.db

.nx

.claude/worktrees
Comment thread
Komoszek marked this conversation as resolved.
Outdated
2 changes: 1 addition & 1 deletion js-client/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
24.13
2 changes: 2 additions & 0 deletions js-client/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
/dist
/coverage
/.nx/cache

.nx/self-healing
Comment thread
Komoszek marked this conversation as resolved.
Outdated
4 changes: 1 addition & 3 deletions js-client/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
const config = require("@leancodepl/prettier-config")

module.exports = config
module.exports = require("@leancodepl/prettier-config")
47 changes: 47 additions & 0 deletions js-client/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import nx from "@nx/eslint-plugin"
import { base, imports } from "@leancodepl/eslint-config"
import jsoncParser from "jsonc-eslint-parser"

const config = [
...nx.configs["flat/base"],
...nx.configs["flat/typescript"],
...nx.configs["flat/javascript"],
...base,
...imports,
{
ignores: ["**/dist", "**/*.timestamp*"],
},
{
files: ["*.ts", "*.tsx", "*.js", "*.jsx", "*.mjs", "*.cjs", "*.mts", "*.cts"],
rules: {
"@nx/enforce-module-boundaries": [
"error",
{
enforceBuildableLibDependency: true,
allow: ["./eslint.config.mjs"],
depConstraints: [
{
sourceTag: "*",
onlyDependOnLibsWithTags: ["*"],
},
],
},
],
},
},
{
files: ["**/*.json"],
languageOptions: {
parser: jsoncParser,
},
rules: {
// The shared @leancodepl base config enables type-aware TS rules globally
// (no `files` scope); they cannot run under the JSON parser, so turn them
// off for JSON files. dependency-checks is the only rule we lint JSON with.
"@typescript-eslint/naming-convention": "off",
"@nx/dependency-checks": "error",
Comment thread
Komoszek marked this conversation as resolved.
},
},
]

export default config
6 changes: 3 additions & 3 deletions js-client/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getJestProjects } from "@nx/jest"
const { getJestProjects } = require("@nx/jest")

export default {
projects: getJestProjects(),
module.exports = {
projects: getJestProjects(),
}
4 changes: 2 additions & 2 deletions js-client/nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"inputs": ["production", "^production"]
},
"lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"]
"inputs": ["default", "{workspaceRoot}/eslint.config.mjs"]
},
"test": {
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"]
Expand All @@ -25,7 +25,7 @@
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"production": [
"default",
"!{projectRoot}/.eslintrc.json",
"!{projectRoot}/eslint.config.mjs",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
"!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/jest.config.[jt]s",
Expand Down
Loading