Skip to content

Commit

Permalink
Merge pull request #26 from criticalmanufacturing/102x-RemoveGulpAndT…
Browse files Browse the repository at this point in the history
…sLint

feat(driver): remove tslint and gulp
  • Loading branch information
jsantos98 authored Jan 10, 2024
2 parents 075f591 + f634942 commit 16a4e3f
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 140 deletions.
15 changes: 8 additions & 7 deletions generators/driver/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class DriverConfig extends ConnectIoTGenerator {
/** Copy all files to destination directory with the settings defined in the previous step */
copyTemplates() {
// Base files:
let filesWithRename: Map<string, string> = new Map<string, string>([
let filesWithRename: Map<string, string> = new Map<string, string>([
["_iot_.gitattributes", ".gitattributes"],
["_iot_.gitignore", ".gitignore"],
["_iot_.npmignore", ".npmignore"],
Expand All @@ -42,16 +42,16 @@ class DriverConfig extends ConnectIoTGenerator {
this.fs.copyTpl(this.templatePath(key), this.destinationPath(this.values.directory, value), this.values);
});

let files: string[] = ["package.json", "README.md", "tsconfig.json", "tslint.json", "gulpfile.js", "packConfig.json"];
let files: string[] = ["package.json", "README.md", "tsconfig.json", ".eslintignore", ".eslintrc.json", "packConfig.json"];
files.forEach((template) => {
this.fs.copyTpl(this.templatePath(template), this.destinationPath(this.values.directory, template), this.values);
});

// Visual Studio settings
files = ["settings.json", "launch.json"];
files.forEach((template) => {
this.fs.copyTpl(this.templatePath("_iot_.vscode", template), this.destinationPath(this.values.directory, ".vscode", template), this.values);
});
// Visual Studio settings
files = ["settings.json", "launch.json"];
files.forEach((template) => {
this.fs.copyTpl(this.templatePath("_iot_.vscode", template), this.destinationPath(this.values.directory, ".vscode", template), this.values);
});

// Driver implementation classes
files = ["index.ts", "types.ts", "inversify.config.ts", "communicationSettings.ts", "driverImplementation.ts"];
Expand All @@ -76,6 +76,7 @@ class DriverConfig extends ConnectIoTGenerator {
}

end() {
this.log("If the project was created with ngx-iot-schematics and there's a workspace please add the entry for the driver under package.json workspaces. If you wish to inherit and run commands from the root");
}
}

Expand Down
2 changes: 2 additions & 0 deletions generators/driver/templates/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/**/node_modules/*
node_modules/
46 changes: 46 additions & 0 deletions generators/driver/templates/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"extends": [
"../../.eslintrc.json"
],
"ignorePatterns": [
"*.d.ts"
],
"overrides": [
{
"files": [
"./*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"test/integration/tsconfig.json"
],
"createDefaultProgram": false
}
}
],
"rules": {
"@typescript-eslint/no-empty-function": [
"error",
{
"allow": [
"functions",
"methods",
"asyncFunctions",
"asyncMethods",
"arrowFunctions"
]
}
],
"prefer-spread": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"args": "none"
}
],
"@typescript-eslint/no-non-null-assertion": "off"
}
}
31 changes: 0 additions & 31 deletions generators/driver/templates/gulpfile.js

This file was deleted.

3 changes: 2 additions & 1 deletion generators/driver/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "src/index.js",
"scripts": {
"build": "tsc",
"lint": "eslint ./**/*.ts",
"watchPackage": "tsc --preserveWatchOutput -w",
"watchTests": "tsc -p test/unit --preserveWatchOutput -w",
"start": "npm run build -- -w | node node_modules/nodemon/bin/nodemon src/index.js --ignore test/",
Expand Down Expand Up @@ -53,7 +54,7 @@
"__CMF_ONLY__cmfLinkDependencies": {
"@criticalmanufacturing/connect-iot-common": "file:../common",
"@criticalmanufacturing/connect-iot-driver": "file:../driver"
},
},
"author": "Critical Manufacturing",
"criticalManufacturing": {
"automationProtocol": {
Expand Down
101 changes: 0 additions & 101 deletions generators/driver/templates/tslint.json

This file was deleted.

0 comments on commit 16a4e3f

Please sign in to comment.