Giter Club home page Giter Club logo

eslint-plugin-filenames-simple's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar epaew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

eslint-plugin-filenames-simple's Issues

Support node v20

Describe the bug

error [email protected]: The engine "node" is incompatible with this module. Expected version "^14.17.0 || ^16.0.0 || ^18.0.0". Got "20.0.0"
error Found incompatible module.

Expected behavior

Node version 20 to be supported

To reproduce

Try to add to any node v20 package

Versions

  • Node.js: 20
  • ESLint: 8.40.0
  • plugin: latest

Execution failed

Environment

  • Node.js version: 12.16.3
  • ESLint version: 7.1.0
  • Plugin version: 0.3.0

Bug detail

Expected behavior

Run ESLint and then finish successfully.

Actual behavior

Failed to run ESLint.

$ eslint .

Oops! Something went wrong! :(

ESLint: 7.1.0

TypeError: declarationParser(...) is not a function or its return value is not iterable
Occurred while linting /home/epaew/workspace/eslint-plugin-filenames-simple/types.ts:1
...

Minimum code of lint target to reproduce the bug

  • types.ts
    export type types = {}
    

ESLint config

  • .eslintrc.yaml
    ---
    root: true
    env:
      es2017: true
      node: true
    extends:
      - plugin:filenames-simple/recommended
    parser: '@typescript-eslint/parser'
    parserOptions:
      ecmaVersion: 2019
      sourceType: module
    

[named-export] False positives when exported name does not strictly follow PascalCase.

Describe the bug

ESLint detects the warning The export name must match the filename. You need to rename to EstreeParser or estreeParser filenames-simple/named-export with the following code.

  • src/utils/eslint-parser/intex.ts
      export class ESTreeParser {
      ...

Expected behavior

No warning is detected.

To reproduce

Versions

  • Node.js: 12.16.3
  • ESLint: 7.11.0
  • plugin: 0.4.0

Your .eslintrc.{js,json,yaml}

https://github.com/epaew/eslint-plugin-filenames-simple/blob/d4669182fd95475091ef14df69e0f5bd928b10d2/.eslintrc.yaml

Additional context

Add any other context about the problem here.

kebab-case fails with filenames long.

Describe the bug

/<private>/components/admin-section/section-crumb/section-crumb.component.ts
  20:1  warning  The filename must follow the rule: 'kebab-case'  filenames-simple/naming-convention

/<private>/components/admin-section/section-menu/section-menu-item.component.ts
  28:1  warning  The filename must follow the rule: 'kebab-case'  filenames-simple/naming-convention
--

/<private>/components/regions/region-remove-dialog/region-remove-dialog.component.ts
  6:5  warning  The filename must follow the rule: 'kebab-case'  filenames-simple/naming-convention
Lint warnings found in the listed files.

Expected behavior

Not fails.

To reproduce

Versions

$ pnpm ls | grep eslint
@angular-eslint/builder 15.2.0
@angular-eslint/eslint-plugin 15.2.0
@angular-eslint/eslint-plugin-template 15.2.0
@angular-eslint/schematics 15.2.0
@angular-eslint/template-parser 15.2.0
@typescript-eslint/eslint-plugin 5.59.2
@typescript-eslint/parser 5.59.2
eslint 8.39.0
eslint-plugin-filenames-simple 0.9.0

Your .eslintrc.{js,json,yaml}

{
  "root": true,
  "ignorePatterns": [
    "projects/**/*"
  ],
  "plugins": [
    "filenames-simple"
  ],
  "rules": {
    "filenames-simple/naming-convention": ["warn", { "rule": "kebab-case" , "excepts":  ["threeBSP", "vertexType"]}]
  },
...

Additional context

how can use * in except?

I would like to use

    "filenames-simple/naming-convention": ["error", {
      "rule": "kebab-case",
      "excepts": ["**/engines/**/properties/*.ts"]
    }]

is that possible, if not please add

Casevalidator invalid regex

Describe the bug

The excepts attribute is not working with regex.

ignorePattern.map(pattern => new RegExp(^${pattern}$)) there is unwanted $ at the beginning of the regex, the $ sign is only to match the last char.

Expected behavior

Should be ignorePattern.map(pattern => new RegExp(^{pattern}$)) and match any regex.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.