🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

@krema/angular-eslint-stylelint-builder

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@krema/angular-eslint-stylelint-builder - npm Package Compare versions

Comparing version

to
1.2.0

@@ -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
[![npm version](https://badge.fury.io/js/@krema%2Fangular-eslint-stylelint-builder.svg)](https://badge.fury.io/js/@krema%2Fangular-eslint-stylelint-builder) ![node workflow](https://github.com/krema/angular-eslint-stylelint-builder/actions/workflows/integration-test.yml/badge.svg) ![node workflow](https://github.com/krema/angular-eslint-stylelint-builder/actions/workflows/unit-test.yml/badge.svg)
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 @@

![](assets/BEC08221-A226-4741-BE42-7BF46004B939.png)
![](.github/assets/terminal.png)

@@ -259,5 +262,1 @@ ## Configuration

</table>
## TODO
- [ ] Write tests

Sorry, the diff of this file is not supported yet