Skip to content

Commit

Permalink
Merge pull request #13816 from vince-roll20/pf_community
Browse files Browse the repository at this point in the history
Pf community
  • Loading branch information
BronsonHall authored Feb 27, 2025
2 parents f5d5af2 + 1a6bdb2 commit e081c1b
Show file tree
Hide file tree
Showing 11 changed files with 843 additions and 220 deletions.
4 changes: 4 additions & 0 deletions Pathfinder Community/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
dist/
prod/
.vscode/
118 changes: 118 additions & 0 deletions Pathfinder Community/dev/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
// eslint.config.mjs
import prettierPlugin from 'eslint-plugin-prettier';
import html from 'eslint-plugin-html';

export default [
{
files: ['**/*.js', '**/*.vue', '**/*.html'], // Adjust as needed
ignores: ['**/node_modules/**', '**/dist/**', '**/prod/**'],
languageOptions: {
ecmaVersion: 2021,
sourceType: 'module',
globals: {
// Common for Roll20 project
console: false,
on: false,
process: false,
randomInteger: false,
getSectionIDs: false,
getTranslationByKey: false,
getAttrs: false,
setAttrs: false,
removeRepeatingRow: false,
generateRowID: false,
setDefaultToken: false,
filterObjs: false,
sendChat: false,
getObj: false,
getAttrByName: false,
startRoll: false,
finishRoll: false,
getActiveCharacterId: false,
$20: false,
_: false,
},
},
plugins: {
prettier: prettierPlugin,
html,
},
settings: {
'html/javascript-mime-types': ['text/javascript', 'text/worker'],
'html/html-extensions': ['.html', '.htm'],
'html/indent': '+2', // indentation is the <script> indentation plus two spaces.
'html/report-bad-indent': 'error',
},
rules: {
// ESLint recommended rules
'no-unused-vars': 'warn',
'no-unused-expressions': [
'error',
{
allowTernary: true,
},
],
'comma-dangle': [
'error',
{
arrays: 'only-multiline',
objects: 'only-multiline',
imports: 'never',
exports: 'never',
functions: 'only-multiline',
},
],
'arrow-body-style': 'off',
'prefer-arrow-callback': 'off',
'no-console': 'off',
camelcase: 'off',
radix: 'off',
'no-underscore-dangle': 'off',
'template-curly-spacing': ['error', 'never'],
'no-useless-escape': 'off',
'no-plusplus': 'off',
'no-multi-assign': 'off',
'no-param-reassign': [
'error',
{
props: false,
},
],
'no-bitwise': [
'error',
{
allow: ['~'],
},
],
'max-classes-per-file': 'off',

// Prettier rules
'prettier/prettier': [
'error',
{
singleQuote: true,
arrowParens: 'always',
useTabs: false,
tabWidth: 2,
endOfLine: 'lf',
semi: true,
printWidth: 180,
bracketSpacing: false,
},
],
},
},
{
// Disable ESLint rules that conflict with Prettier formatting
rules: {
'arrow-body-style': 'off',
'prefer-arrow-callback': 'off',
'no-mixed-operators': 'off',
'no-confusing-arrow': 'off',
'space-before-function-paren': 'off',
'array-bracket-spacing': 'off',
'object-curly-spacing': 'off',
// Add other Prettier-conflicting rules here as necessary
},
},
];
Loading

0 comments on commit e081c1b

Please sign in to comment.