@krema/angular-eslint-stylelint-builder
Advanced tools
Comparing version
@@ -26,3 +26,3 @@ "use strict"; | ||
// Since we don't use those, both are the same in this case. | ||
architectHost = new testing_1.TestingArchitectHost('./test-project', './test-project'); | ||
architectHost = new testing_1.TestingArchitectHost('./test', './test'); | ||
architect = new architect_1.Architect(architectHost, registry); | ||
@@ -38,7 +38,8 @@ // This will either take a Node package name, or a path to the directory | ||
const run = yield architect.scheduleBuilder('@krema/angular-eslint-stylelint-builder:lint', { | ||
eslintFilePatterns: ['src/app/**/*.ts'], | ||
stylelintFilePatterns: ['src/app/**/*.css'], | ||
eslintFilePatterns: ['src/**/*.ts'], | ||
stylelintFilePatterns: ['src/**/*.css'], | ||
}, { logger }); | ||
const loggerPromise = logger | ||
.pipe((0, operators_1.toArray)(), (0, operators_1.map)(x => x.map(y => { | ||
console.log('>>', y.message); | ||
return { level: y.level, message: y.message }; | ||
@@ -67,6 +68,20 @@ }))) | ||
}, | ||
expect.objectContaining({ | ||
{ | ||
level: 'info', | ||
message: expect.stringMatching(/indentation|no-unused-vars|no-debugger/), | ||
}), | ||
// @ts-ignore | ||
message: expect.toIncludeMultiple([ | ||
//autofixable | ||
'autofixable.ts\n' + " 8:10 error Unnecessary 'else' after 'return' eslint\tno-else-return\n", | ||
//file.css | ||
'file.css\n' + | ||
' 3:3 error Expected indentation of 4 spaces (indentation) stylelint\tindentation\n' + | ||
' 4:3 error Expected indentation of 4 spaces (indentation) stylelint\tindentation\n' + | ||
' 5:3 error Expected indentation of 4 spaces (indentation) stylelint\tindentation\n', | ||
//file.ts | ||
'file.ts\n' + " 3:3 error Unexpected 'debugger' statement eslint\tno-debugger\n", | ||
// info messages | ||
'✖ 5 problems (5 errors, 0 warnings)\n' + | ||
' 1 error and 0 warnings potentially fixable with the `--fix` option.\n', | ||
]), | ||
}, | ||
{ | ||
@@ -73,0 +88,0 @@ level: 'error', |
@@ -5,3 +5,3 @@ { | ||
"author": "André Kremser", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"license": "MIT", | ||
@@ -28,5 +28,5 @@ "repository": { | ||
"peerDependencies": { | ||
"@angular-devkit/architect": ">= 0.1202.17", | ||
"@angular-devkit/core": ">= 12.2.17", | ||
"@angular/cli": ">= 12.0.0", | ||
"@angular-devkit/architect": ">= 0.901.15", | ||
"@angular-devkit/core": ">= 9.1.15", | ||
"@angular/cli": ">= 9.1.15", | ||
"eslint": "*", | ||
@@ -33,0 +33,0 @@ "stylelint": "*", |
# Angular ESLint + Stylelint Linter | ||
[](https://badge.fury.io/js/@krema%2Fangular-eslint-stylelint-builder)   | ||
An Angular CLI builder inspired by [@angular-eslint/builder](https://github.com/angular-eslint/angular-eslint/tree/master/packages/builder) for linting Angular applications using [ESLint](https://eslint.org/) and [stylelint](https://stylelint.io/). | ||
@@ -42,3 +45,3 @@ | ||
 | ||
 | ||
@@ -259,5 +262,1 @@ ## Configuration | ||
</table> | ||
## TODO | ||
- [ ] Write tests |
Sorry, the diff of this file is not supported yet
36800
3.36%623
2.47%