relative-url-prefix errors on any relative links that are not at the same depth
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- angular, typescript
- Área
- tooling
Línea de trabajo
Comienza con test/relativeUrlPrefixRule.spec.ts, especialmente con los casos alrededor de las líneas 48-61, y ejecuta las pruebas de esa regla para confirmar el comportamiento actual. Actualiza la regla y sus pruebas para que se acepte ./../foo.ts, mientras que foo.ts y ../foo.ts sigan generando el error de lint.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
When the rule relative-url-prefix is enabled it considers deep relative URLs to not be prefixed correctly.
// Codelyzer considers valid:
'./foo.ts'
// Codelyzer considers invalid:
'./../foo.ts'
While this seems like a bug to me since ./../foo.ts is a relative URL, this library is explicitly testing for this behavior so it may not be considered a bug by the maintainer(s). Reference: https://github.com/mgechev/codelyzer/blob/f12f27b699187bbb443a0400ab678b8ec911eb26/test/relativeUrlPrefixRule.spec.ts#L48-L61
Context and configuration
Please share:
- Which rule is causing the problem
relative-url-prefix
- What's the content of your
tsconfig.json- see below
- What's the content of
~/.codelyzer.js(if applicable)- n/a
TSConfig.json Contents
{
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"preserveWhitespaces": false
},
"compileOnSave": false,
"compilerOptions": {
"allowJs": true,
"alwaysStrict": true,
"baseUrl": "demo",
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es2016",
"es2015",
"dom"
],
"moduleResolution": "node",
"noImplicitAny": false,
"outDir": "./dist/out-tsc",
"plugins": [
{
"name": "typescript-tslint-plugin"
}
],
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
]
}
}
To Reproduce
Steps to reproduce the behavior.
Expected behavior
I would expect the following to raise the lint error:
'foo.ts'
'../foo.ts'
'@my/lib/foo.ts'
I would not expect the following to raise a lint error:
'./foo.ts'
'./../foo.ts'
Code
Share the code which will let us reproduce the problem
Examples above will reproduce the issue.
Environment
- Version [e.g. 22]
5.0.0 - OS: [e.g. iOS]
10.14.4 - Node.js version
11.9.0 - Package manager (yarn/npm) version
yarn 1.15.2 - Angular version
7.2.2 - tslint version
5.14.0
Additional context
Add any other context about the problem here.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.5k
- Forks
- 232
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de mgechev/codelyzer
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 32/100
-
Angular 14Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
-
Support for Angular 10Posiblemente ocupada @ccarmesin la tomó hace 1842 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
Todos los issues de mgechev/codelyzer
Issues similares
-
agent-ready area: ui-server priority: p3 type: test
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
schlessera/brain-kit#4249 ·
Los mantenedores suelen responder en 1 día
-
documentation tool triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
can1357/oh-my-pi#19608 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
dependencies tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
bcgov/nr-waste-plus#1549 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
blixvip/solana-token-meta#17 ·
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
blixvip/solana-tx-parse#18 ·