Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with Next 9 Dynamic Route Segments via File System #1333

Closed
pex opened this issue Jul 15, 2019 · 4 comments · Fixed by standard/standard-engine#228
Closed

Not working with Next 9 Dynamic Route Segments via File System #1333

pex opened this issue Jul 15, 2019 · 4 comments · Fixed by standard/standard-engine#228

Comments

@pex
Copy link

pex commented Jul 15, 2019

What version of standard?

13.0.2

What operating system, Node.js, and npm version?

MacOS 10.14.5, Node.js v12.4.0, npm 6.9.0

What did you expect to happen?

Next.js 9 introduced Dynamic Route Segments via File System. Query parameters are defined using square brackets in file names ([ and ]).
I'd expect standard to support these file names.

What actually happened?

An error occurs:

Error: No files matching '/.../pages/de/blog/[slug].js' were found.
    at FileEnumerator.iterateFiles (/.../node_modules/eslint/lib/cli-engine/file-enumerator.js:274:23)
    at iterateFiles.next (<anonymous>)
    at CLIEngine.executeOnFiles (/.../node_modules/eslint/lib/cli-engine/cli-engine.js:744:48)
    at /.../node_modules/standard-engine/index.js:124:61
    at /.../node_modules/deglob/index.js:51:12
    at end (/.../node_modules/run-parallel/index.js:18:15)
    at done (/.../node_modules/run-parallel/index.js:22:10)
    at each (/.../node_modules/run-parallel/index.js:28:7)
    at /.../node_modules/run-parallel/index.js:43:37
    at f (/.../node_modules/once/once.js:25:25)
@LinusU
Copy link
Member

LinusU commented Jul 16, 2019

Would you mind checking if this is a bug in upstream eslint (seems like it) and report it there? Thanks!

@feross
Copy link
Member

feross commented Jul 28, 2019

Based on the stack trace, there's a chance this is a bug indeglob.

@devklepacki
Copy link

devklepacki commented Oct 14, 2020

For now it seems that with current version 14.3.4 files with names in brackets [example].js are simply skipped. The output is just: c:\dev\some-project\pages\[example].js ignored. As soon as the brackets are removed the file get linted. Is there any way to force linting these? I wasn't able to find any to work on file save.

@feross
Copy link
Member

feross commented Oct 29, 2020

This will be fixed in standard 16

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants