Skip to content

Commit

Permalink
feat: refactor to monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrconley committed May 3, 2023
1 parent f5f1e58 commit 957be7e
Show file tree
Hide file tree
Showing 91 changed files with 1,527 additions and 6,158 deletions.
56 changes: 0 additions & 56 deletions .github/workflows/slacknotify.yml

This file was deleted.

Empty file modified .husky/commit-msg
100644 → 100755
Empty file.
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
File renamed without changes.
95 changes: 75 additions & 20 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,82 @@
import config from "@nrfcloud/utils-eslint";
import {createRequire} from 'node:module'
import {FlatCompat} from "@eslint/eslintrc";
import path from "path";
import {fileURLToPath} from "url";

const require = createRequire(import.meta.url);
// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const compat = new FlatCompat({
recommendedConfig: {},
baseDirectory: __dirname,
});

/**
* @type {import('eslint').Linter.FlatConfig}
* @type {import('eslint').Linter.Config}
*/
export default [
{
ignores: ["**/*.{mjs,js,d.ts}"],
},
...config,
{
files: ["**/*.ts"],
const test = {
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:unicorn/recommended",
"plugin:jest/recommended",
"plugin:jest/style",
"plugin:workspaces/recommended",
"plugin:eslint-comments/recommended",
"plugin:sonarjs/recommended",
],
parser: "@typescript-eslint/parser",
plugins: [
"@typescript-eslint",
"eslint-plugin-workspaces",
"eslint-plugin-unicorn",
"eslint-plugin-jest",
"eslint-plugin-eslint-comments",
"eslint-plugin-sonarjs",
"eslint-plugin-no-secrets",
],
root: true,
ignorePatterns: [
"dist",
"node_modules",
"**/*.js",
],
rules: {
"no-restricted-imports": [
"error",
{
patterns: [{
group: ["@nrfcloud/*-private.*", `!@nrfcloud/${require("./package.json").name.replace('@nrfcloud/', '')}-private.*`],
}],
},
],
// Reduce is confusing, but it shouldn't be banned
"unicorn/no-array-reduce": ["off"],
"unicorn/filename-case": ["error", {
case: "kebabCase",
}],
"workspaces/require-dependency": ["off"],
"unicorn/prevent-abbreviations": ["off"],
"no-secrets/no-secrets": ["warn", {"tolerance": 5.0}],
"unicorn/numeric-separators-style": ["off"],
"@typescript-eslint/no-unused-vars": ["warn", {
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}],
"@typescript-eslint/naming-convention": ["error",
{
selector: 'class',
format: ['PascalCase'],
leadingUnderscore: 'allow'
},
{
selector: 'typeLike',
format: ['PascalCase'],
"custom": {
"regex": "^I[A-Z]",
"match": false
}
},
]
},
};

export default [
{
ignores: ["**/*.d.ts", "dist/**/*"],
},
},
...compat.config(test),
];
11 changes: 0 additions & 11 deletions old/.eslintrc.cjs

This file was deleted.

1 change: 0 additions & 1 deletion old/.github/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions old/.gitignore

This file was deleted.

20 changes: 0 additions & 20 deletions old/dprint.json

This file was deleted.

27 changes: 0 additions & 27 deletions old/package.json

This file was deleted.

28 changes: 0 additions & 28 deletions old/packages/core/package.json

This file was deleted.

7 changes: 0 additions & 7 deletions old/packages/core/src/index.ts

This file was deleted.

16 changes: 0 additions & 16 deletions old/packages/core/tsconfig.json

This file was deleted.

46 changes: 0 additions & 46 deletions old/packages/rest/package.json

This file was deleted.

46 changes: 0 additions & 46 deletions old/packages/rest/src/runtime/decorators.mts

This file was deleted.

Loading

0 comments on commit 957be7e

Please sign in to comment.