diff --git a/.eslintrc.json b/.eslintrc.json index 49563c3..9c57285 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -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 }] } } diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 6cfa414..61f66da 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -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() diff --git a/app/javascript/src/main.jsx b/app/javascript/src/main.jsx index 56cf53f..bad4660 100644 --- a/app/javascript/src/main.jsx +++ b/app/javascript/src/main.jsx @@ -7,11 +7,11 @@ const Main = (props) => ( ) Main.defaultProps = { - name: 'World' + name: 'World', } Main.propTypes = { - name: PropTypes.string + name: PropTypes.string, } export default Main diff --git a/app/javascript/tests/main.spec.jsx b/app/javascript/tests/main.spec.jsx index 3e6acb8..9db9d32 100644 --- a/app/javascript/tests/main.spec.jsx +++ b/app/javascript/tests/main.spec.jsx @@ -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(
)