chore: fix and update prettier and linter rules#9
Open
kumar111222rohit wants to merge 1 commit intosanishkr:masterfrom
Open
chore: fix and update prettier and linter rules#9kumar111222rohit wants to merge 1 commit intosanishkr:masterfrom
kumar111222rohit wants to merge 1 commit intosanishkr:masterfrom
Conversation
sanishkr
requested changes
Sep 2, 2025
| "prepublish": "npm run pretty && npm run test && npm run build", | ||
| "demo": "webpack-dev-server --inline --hot --config demo/webpack.config.js --content-base demo/", | ||
| "pretty": "prettier --write '{__tests__,src}/*.js'" | ||
| "format": "prettier --write \"{src,__tests__,demo,*.js,*.json,*.md}\"", |
Owner
There was a problem hiding this comment.
this still exists in L:15, unpublish
| "build": "babel src/index.js --out-file dist.js", | ||
| "umd": "webpack --config webpack.config.umd.js", | ||
| "lint": "eslint {__tests__,src}/*.js", | ||
| "lint": "eslint .", |
Owner
Comment on lines
+4
to
+27
| quoteProps: 'as-needed', | ||
| trailingComma: 'none', | ||
| tabWidth: 2, | ||
| useTabs: false, | ||
| printWidth: 80, | ||
| endOfLine: 'lf', | ||
| bracketSpacing: true, | ||
| arrowParens: 'avoid', | ||
| jsxSingleQuote: true, | ||
| overrides: [ | ||
| { | ||
| files: '*.json', | ||
| options: { | ||
| printWidth: 200 | ||
| } | ||
| }, | ||
| { | ||
| files: '*.md', | ||
| options: { | ||
| proseWrap: 'always', | ||
| printWidth: 72 | ||
| } | ||
| } | ||
| ] |
Owner
There was a problem hiding this comment.
not sure why we need all of these rules, pls mention the need and what it does?
| import { createRoot } from 'react-dom/client'; | ||
| import ProgressiveImage from '../src/index.js'; | ||
| import React from 'react' | ||
| import {createRoot} from 'react-dom/client' |
Owner
There was a problem hiding this comment.
I would keep the rule to keep spaces in named imports
| }; | ||
| const { image, loading, srcSetData } = this.state; | ||
| const { src, children, noRetry, noLazyLoad } = this.props; | ||
| const { src, children, noLazyLoad } = this.props; |
Owner
There was a problem hiding this comment.
This was supposed to be intended feature, check documentation.
Better fix its usage than remove it
Comment on lines
+33
to
+39
| 'error', | ||
| {argsIgnorePattern: '^_', ignoreRestSiblings: true} | ||
| ], | ||
| 'no-console': 'warn', | ||
| 'prefer-const': 'error', | ||
| 'no-var': 'error' | ||
| }, |
Owner
There was a problem hiding this comment.
same here: if all of it is needed.
If yes, pls add explaination
Comment on lines
+2
to
+6
| umd/ | ||
| node_modules/ | ||
| coverage/ | ||
| *.min.js | ||
| demo/bundle.js No newline at end of file |
Owner
There was a problem hiding this comment.
some of these may not exist in project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Uh oh!
There was an error while loading. Please reload this page.