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

prettier: Numeric separators are not allowed here #15

Open
sukazavr opened this issue Oct 11, 2021 · 2 comments
Open

prettier: Numeric separators are not allowed here #15

sukazavr opened this issue Oct 11, 2021 · 2 comments

Comments

@sukazavr
Copy link

SyntaxError: Numeric separators are not allowed here. (18:6)
  16 |     */
  17 |     export interface SQLAlgorithm1 {
> 18 |     1_activations?: string| null
     |      ^
  19 | ,1_conditions?: string| null
  20 | ,2_activations?: string| null
  21 | ,2_conditions?: string| null
    at t (C:\Users\sukaz\AppData\Roaming\npm-cache\_npx\25756\node_modules\mysql-schema-ts\node_modules\prettier\parser-typescript.js:1:285)
    at Object.parse (C:\Users\sukaz\AppData\Roaming\npm-cache\_npx\25756\node_modules\mysql-schema-ts\node_modules\prettier\parser-typescript.js:14:180461)
    at Object.parse (C:\Users\sukaz\AppData\Roaming\npm-cache\_npx\25756\node_modules\mysql-schema-ts\node_modules\prettier\index.js:9739:19)
    at coreFormat (C:\Users\sukaz\AppData\Roaming\npm-cache\_npx\25756\node_modules\mysql-schema-ts\node_modules\prettier\index.js:13252:23)
    at format (C:\Users\sukaz\AppData\Roaming\npm-cache\_npx\25756\node_modules\mysql-schema-ts\node_modules\prettier\index.js:13510:73)
    at formatWithCursor (C:\Users\sukaz\AppData\Roaming\npm-cache\_npx\25756\node_modules\mysql-schema-ts\node_modules\prettier\index.js:13526:12)
    at C:\Users\sukaz\AppData\Roaming\npm-cache\_npx\25756\node_modules\mysql-schema-ts\node_modules\prettier\index.js:44207:15
    at Object.format (C:\Users\sukaz\AppData\Roaming\npm-cache\_npx\25756\node_modules\mysql-schema-ts\node_modules\prettier\index.js:44226:12)
    at pretty (C:\Users\sukaz\AppData\Roaming\npm-cache\_npx\25756\node_modules\mysql-schema-ts\dist\src\index.js:11:31)
    at Object.inferSchema (C:\Users\sukaz\AppData\Roaming\npm-cache\_npx\25756\node_modules\mysql-schema-ts\dist\src\index.js:44:12) {
  loc: { start: { line: 18, column: 6 } },
  codeFrame: '\x1B[0m \x1B[90m 16 | \x1B[39m\x1B[90m    */\x1B[39m\x1B[0m\n' +
    '\x1B[0m \x1B[90m 17 | \x1B[39m    \x1B[36mexport\x1B[39m interface \x1B[33mSQLAlgorithm1\x1B[39m {\x1B[0m\n' +
    '\x1B[0m\x1B[31m\x1B[1m>\x1B[22m\x1B[39m\x1B[90m 18 | \x1B[39m    \x1B[35m1\x1B[39m_activations\x1B[33m?\x1B[39m\x1B[33m:\x1B[39m string\x1B[33m|\x1B[39m \x1B[36mnull\x1B[39m\x1B[0m\n' +
    '\x1B[0m \x1B[90m    | \x1B[39m     \x1B[31m\x1B[1m^\x1B[22m\x1B[39m\x1B[0m\n' +
    '\x1B[0m \x1B[90m 19 | \x1B[39m\x1B[33m,\x1B[39m\x1B[35m1\x1B[39m_conditions\x1B[33m?\x1B[39m\x1B[33m:\x1B[39m string\x1B[33m|\x1B[39m \x1B[36mnull\x1B[39m\x1B[0m\n' +
    '\x1B[0m \x1B[90m 20 | \x1B[39m\x1B[33m,\x1B[39m\x1B[35m2\x1B[39m_activations\x1B[33m?\x1B[39m\x1B[33m:\x1B[39m string\x1B[33m|\x1B[39m \x1B[36mnull\x1B[39m\x1B[0m\n' +
    '\x1B[0m \x1B[90m 21 | \x1B[39m\x1B[33m,\x1B[39m\x1B[35m2\x1B[39m_conditions\x1B[33m?\x1B[39m\x1B[33m:\x1B[39m string\x1B[33m|\x1B[39m \x1B[36mnull\x1B[39m\x1B[0m'
@nettofarah
Copy link
Owner

I'm wondering if we should use quotes around property names.
What do you think?

@sukazavr
Copy link
Author

Hey!
Yeah, that sounds reasonable.
Or maybe it's better to implement a special flag for those who need it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants