Skip to content

Commit

Permalink
lint: update ESLint rules and auto fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrecego committed Feb 10, 2024
1 parent 733b8f2 commit ad6cdf2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
}
},
"rules": {
// Additional rules or overrides can be added here
"react/react-in-jsx-scope": "off",
"object-curly-spacing": ["error", "always"],
"semi": ["error", "never"],
"max-len": ["error", { "ignoreComments": true }]
}
}
2 changes: 1 addition & 1 deletion app/javascript/packs/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.

import Rails from "@rails/ujs"
import Rails from '@rails/ujs'

Rails.start()
4 changes: 2 additions & 2 deletions app/javascript/src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ const Main = (props) => (
)

Main.defaultProps = {
name: 'World'
name: 'World',
}

Main.propTypes = {
name: PropTypes.string
name: PropTypes.string,
}

export default Main
3 changes: 1 addition & 2 deletions app/javascript/tests/main.spec.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { expect, describe, test } from 'vitest'
import { render } from '@testing-library/react';
import { render } from '@testing-library/react'
import Main from '@/main.jsx'


describe('Main', () => {
test('renders', async () => {
const { getByText } = render(<Main />)
Expand Down

0 comments on commit ad6cdf2

Please sign in to comment.