strictr 0.0.3 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,8 +28,9 @@ const fs = __importStar(require("fs"));
28
28
  const lodash_1 = require("lodash");
29
29
  const missingStrictStatement = (file) => {
30
30
  const content = fs.readFileSync(file, 'utf-8');
31
- const lines = (0, lodash_1.split)(content, '\n');
32
- return !(0, lodash_1.includes)(lines, "'use strict';");
31
+ let lines = (0, lodash_1.split)(content, '\n');
32
+ lines = (0, lodash_1.map)(lines, lodash_1.trim);
33
+ return !(0, lodash_1.find)(lines, (line) => (0, lodash_1.includes)(line, 'use strict'));
33
34
  };
34
35
  exports.default = missingStrictStatement;
35
36
  //# sourceMappingURL=missing.strict.statement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"missing.strict.statement.js","sourceRoot":"","sources":["../../src/functions/missing.strict.statement.ts"],"names":[],"mappings":";AACA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,uCAAyB;AAEzB,mCAAuC;AAEvC,MAAM,sBAAsB,GAAG,CAAC,IAAY,EAAW,EAAE;IACxD,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,IAAA,cAAK,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACnC,OAAO,CAAC,IAAA,iBAAQ,EAAC,KAAK,EAAE,eAAe,CAAC,CAAC;AAC1C,CAAC,CAAC;AACF,kBAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"missing.strict.statement.js","sourceRoot":"","sources":["../../src/functions/missing.strict.statement.ts"],"names":[],"mappings":";AACA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,uCAAyB;AAEzB,mCAAwD;AAExD,MAAM,sBAAsB,GAAG,CAAC,IAAY,EAAW,EAAE;IACxD,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAE/C,IAAI,KAAK,GAAG,IAAA,cAAK,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACjC,KAAK,GAAG,IAAA,YAAG,EAAC,KAAK,EAAE,aAAI,CAAC,CAAC;IAEzB,OAAO,CAAC,IAAA,aAAI,EAAC,KAAK,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,IAAA,iBAAQ,EAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC;AACrE,CAAC,CAAC;AACF,kBAAe,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,81 +1,83 @@
1
- {
2
- "name": "strictr",
3
- "version": "0.0.3",
4
- "description": "strict statement checker",
5
- "engines": {
6
- "node": ">=16.0.0"
7
- },
8
- "main": "./lib/strictr.js",
9
- "types": "./lib/strictr.d.ts",
10
- "scripts": {
11
- "go": "ts-node ./src/strictr.ts",
12
- "all": "pnpm i & tsc & pnpm clean & pnpm format & pnpm build & pnpm test & pnpm docs",
13
- "build": "del /S /Q lib\\* && tsc",
14
- "build:watch": "tsc --watch",
15
- "lint": "tslint -p tsconfig.json",
16
- "docs": "typedoc --readme none --out docs src",
17
- "test": "nyc mocha -r ts-node/register test/**/*.spec.ts",
18
- "clean": "tslint --config tslint-imports.json --fix --project .",
19
- "imports": "tslint --project tsconfig.json --config tslint-imports.json",
20
- "fiximports": "tslint --project tsconfig.json --config tslint-imports.json --fix --project",
21
- "format": "prettier --write \"src/**/*.ts\"",
22
- "up": "pnpm up -i",
23
- "upgrade": "pnpm up",
24
- "latest": "pnpm up -i -L"
25
- },
26
- "preferGlobal": true,
27
- "bin": {
28
- "strictr": "./lib/strictr.js"
29
- },
30
- "files": [
31
- "lib/**/*"
32
- ],
33
- "nyc": {
34
- "include": [
35
- "src/**/*.ts"
36
- ],
37
- "exclude": [
38
- "test/**/*.ts"
39
- ],
40
- "extension": [
41
- ".ts"
42
- ],
43
- "require": [
44
- "ts-node/register"
45
- ],
46
- "reporter": [
47
- "text-summary",
48
- "html"
49
- ],
50
- "sourceMap": true,
51
- "instrument": true
52
- },
53
- "repository": "https://github.com/cope/strictr.git",
54
- "author": "Predrag Stojadinovic <Predrag@Stojadinovic.net>",
55
- "license": "MIT",
56
- "dependencies": {
57
- "@types/cli-table": "^0.3.0",
58
- "cli-table": "^0.3.11",
59
- "commander": "^8.3.0",
60
- "lodash": "^4.17.21"
61
- },
62
- "devDependencies": {
63
- "@types/chai": "^4.3.0",
64
- "@types/commander": "^2.12.2",
65
- "@types/lodash": "^4.14.178",
66
- "@types/mocha": "^9.1.0",
67
- "@types/node": "^17.0.10",
68
- "chai": "^4.3.4",
69
- "mocha": "^9.1.4",
70
- "nyc": "^15.1.0",
71
- "prettier": "^2.5.1",
72
- "source-map-support": "^0.5.21",
73
- "ts-node": "^10.4.0",
74
- "tslint": "^6.1.3",
75
- "tslint-config-prettier": "^1.18.0",
76
- "tslint-etc": "^1.13.10",
77
- "tslint-no-unused-expression-chai": "^0.1.4",
78
- "typedoc": "^0.22.11",
79
- "typescript": "^4.5.5"
80
- }
81
- }
1
+ {
2
+ "name": "strictr",
3
+ "version": "0.1.0",
4
+ "description": "strict statement checker",
5
+ "engines": {
6
+ "node": ">=16.0.0"
7
+ },
8
+ "main": "./lib/strictr.js",
9
+ "types": "./lib/strictr.d.ts",
10
+ "scripts": {
11
+ "go": "ts-node ./src/strictr.ts",
12
+ "all": "pnpm i & tsc & pnpm clean & pnpm format & pnpm build & pnpm test & pnpm docs",
13
+ "build": "del /S /Q lib\\* && tsc",
14
+ "build:watch": "tsc --watch",
15
+ "lint": "tslint -p tsconfig.json",
16
+ "docs": "typedoc --readme none --out docs src",
17
+ "test": "nyc mocha -r ts-node/register test/**/*.spec.ts",
18
+ "clean": "tslint --config tslint-imports.json --fix --project .",
19
+ "imports": "tslint --project tsconfig.json --config tslint-imports.json",
20
+ "fiximports": "tslint --project tsconfig.json --config tslint-imports.json --fix --project",
21
+ "format": "prettier --write \"src/**/*.ts\"",
22
+ "up": "pnpm up -i",
23
+ "upgrade": "pnpm up",
24
+ "latest": "pnpm up -i -L",
25
+ "l": "pnpm i & pnpm latest",
26
+ "preinstall": "npx only-allow pnpm"
27
+ },
28
+ "preferGlobal": true,
29
+ "bin": {
30
+ "strictr": "./lib/strictr.js"
31
+ },
32
+ "files": [
33
+ "lib/**/*"
34
+ ],
35
+ "nyc": {
36
+ "include": [
37
+ "src/**/*.ts"
38
+ ],
39
+ "exclude": [
40
+ "test/**/*.ts"
41
+ ],
42
+ "extension": [
43
+ ".ts"
44
+ ],
45
+ "require": [
46
+ "ts-node/register"
47
+ ],
48
+ "reporter": [
49
+ "text-summary",
50
+ "html"
51
+ ],
52
+ "sourceMap": true,
53
+ "instrument": true
54
+ },
55
+ "repository": "https://github.com/cope/strictr.git",
56
+ "author": "Predrag Stojadinovic <Predrag@Stojadinovic.net>",
57
+ "license": "MIT",
58
+ "dependencies": {
59
+ "@types/cli-table": "^0.3.1",
60
+ "cli-table": "^0.3.11",
61
+ "commander": "^9.4.1",
62
+ "lodash": "^4.17.21"
63
+ },
64
+ "devDependencies": {
65
+ "@types/chai": "^4.3.4",
66
+ "@types/commander": "^2.12.2",
67
+ "@types/lodash": "^4.14.191",
68
+ "@types/mocha": "^10.0.1",
69
+ "@types/node": "^18.11.18",
70
+ "chai": "^4.3.7",
71
+ "mocha": "^10.2.0",
72
+ "nyc": "^15.1.0",
73
+ "prettier": "^2.8.1",
74
+ "source-map-support": "^0.5.21",
75
+ "ts-node": "^10.4.0",
76
+ "tslint": "^6.1.3",
77
+ "tslint-config-prettier": "^1.18.0",
78
+ "tslint-etc": "^1.13.10",
79
+ "tslint-no-unused-expression-chai": "^0.1.4",
80
+ "typedoc": "^0.23.23",
81
+ "typescript": "^4.9.4"
82
+ }
83
+ }