Comments (2)
It seems caused by the first line (which I got from the example here)
// forbid leading and trailing underscores and enforce camelCase on EVERY name. will be overridden by subtypes if needed
{"type": "default", "format": "camelCase", "leadingUnderscore": "forbid", "trailingUnderscore": "forbid"},
So it could be also caused by the missing Specifity , or the Specifity for "default" is too high...
Honestly I tried adding "accessor = Specifity.class" but it doesn't seem to work for me.
enum Specifity {
// tslint:disable:naming-convention
const = 1,
readonly = Specifity.const,
static = 1 << 1,
global = Specifity.static,
local = Specifity.static,
public = 1 << 2,
protected = Specifity.public,
private = Specifity.public,
abstract = 1 << 3,
export = 1 << 4,
import = 1 << 5,
rename = 1 << 6,
unused = 1 << 7,
filter = 1 << 8,
default = 1 << 9,
variable = 2 << 9,
function = 3 << 9,
functionVariable = Specifity.function,
parameter = 4 << 9,
member = 5 << 9,
property = 6 << 9,
method = Specifity.property,
enumMember = 7 << 9,
parameterProperty = enumMember,
type = 8 << 9,
class = 9 << 9,
interface = Specifity.class,
typeAlias = Specifity.class,
genericTypeParameter = Specifity.class,
enum = Specifity.class
// tslint:enable:naming-convention
}
So in the end I changed the first line removing the "type", but this should probably be fixed.
I know that TSLINT is going to die, but I tried ESLINT and the naming-convention is still very far from working like this one.
EDIT
Noted that by adding a tslint
in a subfolder, it works fine...
from tslint-consistent-codestyle.
Ultimately I found out that this is PHPStorm's fault. The problem is that it doesn't get the correct path of the local tslint and probably uses some internal build.
I'm still verifying but it seems to be solved by installing tslint globally.
I'm closing this for now as:
- Tests from this repo showed it actually works ok
- In VSCode I wasn't able to reproduce the error
- Probably the workaround of having tslint globally is ok
Byez
from tslint-consistent-codestyle.
Related Issues (20)
- naming-convention: Object properties are not linted HOT 1
- Moving to ESLint and TSLint deprecation HOT 1
- naming-convention: banned names and require minimum length HOT 1
- naming-convention: filter doesn't work properly HOT 3
- Cannot read property 'kind' of undefined at rules/noUnusedRule.js:155:69 HOT 4
- no-accessor-recursion - improve detection HOT 1
- filter on methods is not working HOT 2
- An in-range update of coveralls is breaking the build 🚨 HOT 11
- naming-conventions: question - recognize if variable is primitive HOT 1
- Naming convention enum pascal case does not detect single words. HOT 1
- (bug) strictCamelCase does not work as expected. HOT 2
- Lint isn't applied to interface members.
- feature request: naming-convention - set rule for `for` loop control variables HOT 1
- feature request: prohibit string comparison
- tnslint command line execution doesn't report errors for naming-convention rule
- Support TSLint 6.1.0 HOT 1
- Naming convention for certain types (Observables) HOT 1
- Angular installation error, 'npm WARN deprecated [email protected]: TSLint has been deprecated in favor of ESLint. HOT 1
- no-as-type-assertion false positive for const assertions (ts 3.4) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tslint-consistent-codestyle.