Skip to content

Commit

Permalink
Merge #435 from mikavilpas/fix-prettier-parser
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmk authored Nov 17, 2024
2 parents 8702dcd + 893d742 commit 366d6a7
Show file tree
Hide file tree
Showing 18 changed files with 234 additions and 263 deletions.
5 changes: 1 addition & 4 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
module.exports = {
presets: [
['@babel/preset-env', { targets: { node: '8.15.1' } }],
'@babel/preset-typescript',
],
presets: [['@babel/preset-env', { targets: { node: '8.15.1' } }], '@babel/preset-typescript'],
plugins: ['@babel/plugin-proposal-class-properties'],

env: {
Expand Down
13 changes: 6 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
module.exports = {
extends: [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'prettier',
],
extends: ['airbnb-base', 'plugin:@typescript-eslint/recommended', 'prettier'],
plugins: ['unicorn', 'import', 'prettier', '@typescript-eslint'],
parser: '@typescript-eslint/parser',
parserOptions: {
Expand All @@ -29,7 +25,10 @@ module.exports = {
// `jest` against the compiled .js results (would require compiling
// the test files as well)?
'unicorn/prefer-at': 'off',
'import/no-extraneous-dependencies': ['error', {'devDependencies': true, 'optionalDependencies': false, 'peerDependencies': false}],
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: true, optionalDependencies: false, peerDependencies: false },
],
},
},
],
Expand Down Expand Up @@ -65,7 +64,7 @@ module.exports = {

// Causes issues with enums
'no-shadow': 'off',
'prefer-destructuring': 'off', // Intentionally disabled trash.
'prefer-destructuring': 'off', // Intentionally disabled trash.

// prettier things
'prettier/prettier': 'error',
Expand Down
82 changes: 41 additions & 41 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,44 @@

version: 2
updates:
- package-ecosystem: 'npm'
directory: '/' # Location of package manifests.
commit-message:
prefix: 'deps'
schedule:
interval: 'weekly'
ignore:
# @types/node should match our minimum supported node.js version ("engine").
- dependency-name: '@types/node'
groups:
eslint:
patterns:
- '@typescript-eslint/*'
- 'eslint*'
babel:
patterns:
- '@babel/*'
- 'babel*'
types:
patterns:
- '@types/*'
exclude-patterns:
- '@types/node'
test:
patterns:
- 'mocha*'
- '@types/mocha'
- 'jest*'
- 'c8'
- 'expect'
# Check for updates to GitHub Actions every week
- package-ecosystem: 'github-actions'
directory: '/'
commit-message:
prefix: 'deps'
schedule:
interval: 'daily'
groups:
github-actions:
patterns:
- '*'
- package-ecosystem: 'npm'
directory: '/' # Location of package manifests.
commit-message:
prefix: 'deps'
schedule:
interval: 'weekly'
ignore:
# @types/node should match our minimum supported node.js version ("engine").
- dependency-name: '@types/node'
groups:
eslint:
patterns:
- '@typescript-eslint/*'
- 'eslint*'
babel:
patterns:
- '@babel/*'
- 'babel*'
types:
patterns:
- '@types/*'
exclude-patterns:
- '@types/node'
test:
patterns:
- 'mocha*'
- '@types/mocha'
- 'jest*'
- 'c8'
- 'expect'
# Check for updates to GitHub Actions every week
- package-ecosystem: 'github-actions'
directory: '/'
commit-message:
prefix: 'deps'
schedule:
interval: 'daily'
groups:
github-actions:
patterns:
- '*'
136 changes: 68 additions & 68 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,77 +22,77 @@ jobs:
node: ['14', '16', '18', '20']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
exclude:
- os: macos-latest
node: '14'
- os: macos-latest
node: '16'
- os: windows-latest
node: '14'
- os: windows-latest
node: '16'
- os: macos-latest
node: '14'
- os: macos-latest
node: '16'
- os: windows-latest
node: '14'
- os: windows-latest
node: '16'
include:
- os: ubuntu-latest
NIGHTLY: nvim-linux64.tar.gz
NVIM_BIN_PATH: nvim-linux64/bin
EXTRACT: tar xzf
- os: macos-latest
NIGHTLY: nvim-macos-x86_64.tar.gz
NVIM_BIN_PATH: nvim-macos-x86_64/bin
EXTRACT: tar xzf
- os: windows-latest
NIGHTLY: nvim-win64.zip
NVIM_BIN_PATH: nvim-win64/bin
EXTRACT: unzip
- os: ubuntu-latest
NIGHTLY: nvim-linux64.tar.gz
NVIM_BIN_PATH: nvim-linux64/bin
EXTRACT: tar xzf
- os: macos-latest
NIGHTLY: nvim-macos-x86_64.tar.gz
NVIM_BIN_PATH: nvim-macos-x86_64/bin
EXTRACT: tar xzf
- os: windows-latest
NIGHTLY: nvim-win64.zip
NVIM_BIN_PATH: nvim-win64/bin
EXTRACT: unzip

runs-on: ${{ matrix.os }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
cache: npm
node-version: ${{ matrix.node }}

- name: update npm (for node.js 14)
if: matrix.node == '14'
run: npm install -g 'npm@^8.8.0'

- name: install neovim
run: |
curl -LO 'https://github.com/neovim/neovim/releases/download/nightly/${{ matrix.NIGHTLY }}'
${{ matrix.EXTRACT }} ${{ matrix.NIGHTLY }}
echo '${{ runner.os }}'
- name: update path (bash)
if: runner.os != 'Windows'
run: echo "$(pwd)/${{ matrix.NVIM_BIN_PATH }}" >> $GITHUB_PATH

- name: update path (windows)
if: runner.os == 'Windows'
run: echo "$(pwd)/${{ matrix.NVIM_BIN_PATH }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: install dependencies
run: npm ci

- name: build
run: npm run build

- name: lint
# Skip on old Node.js, devDependencies use newish JS features.
if: matrix.node != '14'
run: npm run lint

- name: test
run: |
echo $PATH
which nvim
nvim --version
npm run test-coverage --stream
- uses: codecov/codecov-action@v5
if: matrix.node == '20'
with:
verbose: true # optional (default = false)
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
cache: npm
node-version: ${{ matrix.node }}

- name: update npm (for node.js 14)
if: matrix.node == '14'
run: npm install -g 'npm@^8.8.0'

- name: install neovim
run: |
curl -LO 'https://github.com/neovim/neovim/releases/download/nightly/${{ matrix.NIGHTLY }}'
${{ matrix.EXTRACT }} ${{ matrix.NIGHTLY }}
echo '${{ runner.os }}'
- name: update path (bash)
if: runner.os != 'Windows'
run: echo "$(pwd)/${{ matrix.NVIM_BIN_PATH }}" >> $GITHUB_PATH

- name: update path (windows)
if: runner.os == 'Windows'
run: echo "$(pwd)/${{ matrix.NVIM_BIN_PATH }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: install dependencies
run: npm ci

- name: build
run: npm run build

- name: lint
# Skip on old Node.js, devDependencies use newish JS features.
if: matrix.node != '14'
run: npm run lint

- name: test
run: |
echo $PATH
which nvim
nvim --version
npm run test-coverage --stream
- uses: codecov/codecov-action@v5
if: matrix.node == '20'
with:
verbose: true # optional (default = false)
1 change: 0 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"tabWidth": 2,
"trailingComma": "es5",
"parser": "typescript",
"printWidth": 100,
"singleQuote": true,
"arrowParens": "avoid"
Expand Down
Loading

0 comments on commit 366d6a7

Please sign in to comment.