chernodub / eslint-config Goto Github PK
View Code? Open in Web Editor NEWtypescript-only, framework-agnostic
typescript-only, framework-agnostic
export class NotesComponent {
/** Project based on the opened url. */
public readonly project$: Observable<Project>;
public constructor(
private readonly projectsService: ProjectsService,
activatedRoute: ActivatedRoute,
) {
}
When we set way, as on repo readme file
("lint": "eslint src/**/*.ts --fix")
, linter does not work with child directories. It's happen cause of eslint CLI rules.
For check it, visit eslint CLI docs: https://eslint.org/docs/user-guide/command-line-interface
To reproduce:
Generate angular project
Install eslint via npm or yarn
install current eslint (repo) via npm, or command from readme file
(npm i -D @chernodub/eslint-config && echo "{ "extends": "@chernodub/eslint-config" }" > .eslintrc.json
)
Expected result:
Lint working with all .ts file in src directory and child directories
Actual result:
Lint working only with .ts files in describe directory,
Lint doesn't working with .ts files from child directories;
Environment:
Ubuntu 20/04 LTS, IDE WebStorm (JetBrains), angular v.12.2.0, npm v 7.20.3, node v. 16.6.1
Proposed solution:
Add quotes to set way, like that:
"lint": "eslint 'src/**' --fix"
Additional issue:
After added quotes, lint working with all childs directories, and check all formats.
Unfortunatelly, if we using quotes for setting global scope, formats names will be ignored.
(Info from eslint documentation)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.