Skip to content

Commit 20bc9d1

Browse files
committed
chore: new workspace detector
1 parent 89ca866 commit 20bc9d1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1315
-82
lines changed

cli/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
[![https://nodei.co/npm/smelly-cli.png?downloads=true&downloadRank=true&stars=true](https://nodei.co/npm/smelly-cli.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/smelly-cli)
66

7-
87
Smelly is a command line tool application that helps javascript/typescript developers to keep their test
98
suite away from test smells.
109

cli/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env node
2-
require('./src/bin/find-smells.js');
2+
require('./src/find-smells.js');

cli/package.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,15 @@
33
"version": "0.0.5",
44
"private": false,
55
"description": "Find out the smells in your tests, suggestions for correction and the theory behind them",
6-
"main": "dist/cli.js",
7-
"types": "./types/src/index.d.ts",
8-
"bin": "build/index.js",
6+
"main": "build/find-smells.js",
7+
"bin": "build/find-smells.js",
98
"dependencies": {
10-
"commander": "^12.1.0",
11-
"esprima": "^4.0.1",
12-
"handlebars": "^4.7.8"
9+
"commander": "^12.1.0"
1310
},
1411
"repository": {
1512
"url": "https://github.com/marabesi/smelly-test/tree/main/cli"
1613
},
1714
"devDependencies": {
18-
"@stryker-mutator/mocha-runner": "^8.5.0",
19-
"@stryker-mutator/typescript-checker": "^8.5.0",
20-
"@types/esprima": "^4.0.6",
2115
"@types/expect": "^24.3.0",
2216
"@types/mocha": "^10.0.8",
2317
"@types/node": "^20.14.8",
@@ -34,8 +28,7 @@
3428
"ts-node": "^10.9.2"
3529
},
3630
"scripts": {
37-
"compile": "webpack",
38-
"build": "rm -rf build/ && tsc && cp index.js build/",
31+
"compile": "rm -rf build/ && tsc",
3932
"watch": "webpack --watch",
4033
"clean": "rm -rf out/ dist/ types/",
4134
"compile-tests": "npm run clean && tsc -p . --outDir out",
@@ -46,7 +39,7 @@
4639
"test:coverage": "nyc --reporter=lcov ts-mocha -p tsconfig.json ts-node/register ./**/**.test.ts",
4740
"test:mutation": "stryker run",
4841
"coveralls": "npm run test:coverage && coveralls --verbose < coverage/lcov.info",
49-
"cli": "ts-node src/bin/find-smells.ts"
42+
"cli": "ts-node src/find-smells.ts"
5043
},
5144
"author": {
5245
"name": "Matheus Marabesi",

cli/src/bin/find-smells.ts renamed to cli/src/find-smells.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import path from 'path';
22
import fs, { readdir } from 'node:fs/promises';
3-
import { SmellDetector, SupportedLanguages } from '../index';
3+
import { SmellDetector, SupportedLanguages } from 'smelly-detector';
4+
import { SmellsAggreagtor, SmellsList } from 'smelly-detector/src/reporters/Html';
45
import { join } from 'node:path';
5-
import { SmellsAggreagtor, SmellsList } from '../reporters/Html';
66

77
const args = process.argv;
88
const fileName = args[2];

cli/webpack.config.js

Lines changed: 0 additions & 48 deletions
This file was deleted.

detector/.eslintrc.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
8+
"plugins": [
9+
"@typescript-eslint"
10+
],
11+
"rules": {
12+
"@typescript-eslint/naming-convention": "warn",
13+
"@typescript-eslint/semi": "warn",
14+
"curly": "warn",
15+
"eqeqeq": "warn",
16+
"no-throw-literal": "warn",
17+
"semi": "off"
18+
},
19+
"ignorePatterns": [
20+
"out",
21+
"dist",
22+
"**/*.d.ts"
23+
]
24+
}

detector/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- https://github.com/mochajs/mocha-examples/tree/main/packages/typescript

detector/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# @smelly/cli
2+
3+
[![Continuous Integration Workflow](https://github.com/marabesi/smelly-test/actions/workflows/nodejs.yml/badge.svg)](https://github.com/marabesi/smelly-test/actions/workflows/nodejs.yml)
4+
5+
[![https://nodei.co/npm/smelly-cli.png?downloads=true&downloadRank=true&stars=true](https://nodei.co/npm/smelly-cli.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/smelly-cli)
6+
7+
8+
Smelly is a command line tool application that helps javascript/typescript developers to keep their test
9+
suite away from test smells.
10+
11+
## Command Line Interface
12+
13+
```sh
14+
npm run cli -- path/to/file/test.js typescript
15+
```
16+
17+
## Resources
18+
19+
- [Tailwind CSS Table - Flowbite](https://flowbite.com/docs/components/tables)
20+
- [Handlebars](https://handlebarsjs.com/guide/#what-is-handlebars)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
describe("my test", () => {
2+
3+
});

0 commit comments

Comments
 (0)