diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml new file mode 100644 index 00000000..1785cfdb --- /dev/null +++ b/.github/workflows/prettier-check.yml @@ -0,0 +1,18 @@ +name: Prettier Check +on: [push, pull_request] +jobs: + run-prettier-check: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 18.17.1 + cache: 'npm' + - name: Install modules + run: npm install + - name: Run prettier check + run: npm run prettier-check \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..9b5a1ba8 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,74 @@ +# https://github.com/github/gitignore/blob/master/C.gitignore + +# VSCode files +.vs/ +.vscode/ + +# Build files +build/ + +# Prerequisites +*.d + +# Object files +*.o +*.ko +*.obj +*.elf + +# Linker output +*.ilk +*.map +*.exp + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf + +# cscope with Vim +cscope.* + +#ctags with Vim +tags +types_c.taghl + +#CtrlP +ctrlp.root + +#html +*.html \ No newline at end of file diff --git a/prettierrc.json b/prettierrc.json new file mode 100644 index 00000000..fcaf81ae --- /dev/null +++ b/prettierrc.json @@ -0,0 +1,7 @@ +{ + "semi": true, + "trailingComma": "none", + "tabWidth": 2, + "singleQuote": true, + "printWidth": 125 +} \ No newline at end of file