Custom Linter .lesshint file require throws error
See original GitHub issueWhich version of lesshint
are you using?
2.4.0
How are you running lesshint
? CLI, Node.js API, Grunt/Gulp plugin?
CLI
What’s your .lesshintrc
configuration?
{
"linters": [
require("./linters/custom-linter")
],
"singleLinePerSelector": false,
"propertyOrdering": false,
"importantRule": false,
"zeroUnit": false,
"decimalZero": false,
"newlineAfterBlock": false,
"hexNotation": false,
"qualifyingElement": false,
"spaceBeforeBrace": {
"style": "one_space"
},
"singleLinePerProperty": true,
"hexLength": false,
"spaceAroundOperator": false,
"attributeQuotes": false,
"stringQuotes": false,
"finalNewline": false,
"idSelector": false,
"borderZero": false,
"maxCharPerLine": false,
"emptyRule": true,
"trailingSemicolon": true,
"spaceAfterPropertyColon": {
"style": "one_space"
}
}
If you’re reporting a bug, please show us some code that’s failing.
"linters": [
require("./linters/custom-linter")
],
What did you expect to happen?
Run the custom linter
What’s the actual result?
Something’s wrong with the config file. Error: Unexpected token r
Would you be interested in submitting a PR for this issue?
Didn’t manage to diving into lesshint code
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
How to tell my linter to flag require() statements with a warning
I ran yarn add eslint -D and npx eslint --init to set up eslint . Then I changed the rules: object in my...
Read more >LessHint - GitHub
A globby glob pattern or a file to exclude from being linted. -l / --linters, Paths to custom linters to add to the...
Read more >Custom Linters - What is Trunk?
Every custom linter must specify a name, the types of files it will run on, ... If there are multiple non-empty captures, a...
Read more >Customizing Your Super-Linter and ESLint JavaScript Rules
In this post, we will look at how to customize the rules. ... This tells the linter to use a config file in...
Read more >How to write a custom ESLint rule - Scott Logic Blog
Always wanted to write a custom linting rule for your JavaScript ... This guide will introduce the key concepts you need to give...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
They just merged a PR today to assist with that https://github.com/lesshint/lesshint/pull/328
(updated; please use backticks for code)