Skip to content

Commit

Permalink
eslint formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
SethSharp committed Jan 26, 2024
1 parent 78297a4 commit ba8e4e8
Show file tree
Hide file tree
Showing 34 changed files with 4,848 additions and 1,693 deletions.
43 changes: 43 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2020, // Use the latest ecmascript standard
sourceType: 'module', // Allows using import/export statements
ecmaFeatures: {
jsx: true, // Enable JSX since we're using React
},
},
settings: {
react: {
version: 'detect',
},
},
env: {
browser: true,
amd: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:prettier/recommended',
],
plugins: ['prettier'],
rules: {
'react/jsx-first-prop-new-line': [2, 'multiline'],
'react/jsx-max-props-per-line': [2, { maximum: 1, when: 'multiline' }],
'react/jsx-indent-props': [2, 2],
'react/jsx-closing-bracket-location': [2, 'tag-aligned'],
'prettier/prettier': [
'error',
{},
{
usePrettierrc: true,
},
],
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'no-console': 2,
},
};
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:

- name: Format code
run: |
echo "running formatter..."
npm run format
echo "running php-cs-fixer..."
vendor/bin/php-cs-fixer fix
Expand Down
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"printWidth": 80,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"arrowParens": "avoid"
}
Loading

0 comments on commit ba8e4e8

Please sign in to comment.