Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Commit ce9b58e

Browse files
First setup
1 parent 07d7465 commit ce9b58e

File tree

10 files changed

+17560
-0
lines changed

10 files changed

+17560
-0
lines changed

.babelrc

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"env": {
3+
"test": {
4+
"presets": [
5+
[
6+
"@babel/preset-env",
7+
{
8+
"targets": {
9+
"node": "current"
10+
}
11+
}
12+
]
13+
]
14+
}
15+
}
16+
}

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# don't ever lint node_modules
2+
node_modules
3+
# don't lint build output (make sure it's set to your correct build folder name)
4+
build

.eslintrc.js

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: true,
5+
node: true,
6+
jest: true,
7+
},
8+
extends: [
9+
'plugin:@typescript-eslint/recommended',
10+
'@nuxtjs/eslint-config-typescript',
11+
'plugin:nuxt/recommended',
12+
'plugin:jest/recommended',
13+
'plugin:jest/style',
14+
],
15+
plugins: [
16+
'@typescript-eslint/eslint-plugin',
17+
'jest',
18+
],
19+
rules: {
20+
'@typescript-eslint/explicit-function-return-type': 'off',
21+
'@typescript-eslint/explicit-module-boundary-types': 'off',
22+
'@typescript-eslint/interface-name-prefix': 'off',
23+
'@typescript-eslint/no-explicit-any': 'off',
24+
'@typescript-eslint/no-extra-semi': 'off',
25+
'@typescript-eslint/no-unused-vars': ['error', { 'vars': 'all', 'args': 'after-used', 'ignoreRestSiblings': false }],
26+
'array-bracket-newline': ['error', 'consistent'],
27+
'comma-dangle': ['error', 'always-multiline'],
28+
'jest/expect-expect': ['error', { 'assertFunctionNames': ['expect', 'supertest.**.expect'] }],
29+
'max-len': ['error', { 'code': 140, 'tabWidth': 2, 'ignoreComments': true }],
30+
'no-unused-vars': 'off',
31+
'no-useless-constructor': 'off',
32+
'quote-props': ['error', 'consistent'],
33+
'semi': ['error', 'always'],
34+
'semi-style': ['error', 'last'],
35+
'space-before-function-paren': ['error', { 'anonymous': 'never', 'named': 'never', 'asyncArrow': 'always' }],
36+
'space-in-parens': ['error', 'never'],
37+
'vue/no-mutating-props': 0,
38+
'vue/no-v-html': 0,
39+
},
40+
};

.github/workflows/ci.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: ci
2+
3+
on: push
4+
5+
jobs:
6+
ci:
7+
runs-on: ${{ matrix.os }}
8+
9+
strategy:
10+
matrix:
11+
os: [ubuntu-20.04]
12+
node: [16]
13+
14+
steps:
15+
- name: Checkout 🛎
16+
uses: actions/checkout@v2
17+
18+
- name: Setup node env 🏗
19+
uses: actions/[email protected]
20+
with:
21+
node-version: ${{ matrix.node }}
22+
always-auth: true
23+
registry-url: https://npm-proxy.fury.io/localsearch/
24+
scope: '@localsearch'
25+
26+
- name: Install dependencies 👨🏻‍💻
27+
uses: bahmutov/npm-install@v1
28+
env:
29+
NODE_AUTH_TOKEN: ${{secrets.BUNDLE_GEM__FURY__IO}}
30+
31+
- name: Run linter 👀
32+
run: npm run lint
33+
34+
- name: Run tests 🧪
35+
run: npm run test

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,6 @@ dist
102102

103103
# TernJS port file
104104
.tern-port
105+
106+
# Ignore build directory
107+
build

README.md

100644100755
+29
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,31 @@
11
# nuxtjs-rollbar
2+
23
Rollbar module for NuxtJs
4+
5+
## Setup
6+
7+
1. Add `@localsearch/nuxtjs-rollbar` dependency to your project
8+
9+
```bash
10+
npm install @localsearch/nuxtjs-rollbar
11+
```
12+
13+
2. Add `@localsearch/nuxtjs-rollbar` to the `modules` section of `nuxt.config.js`
14+
15+
```js
16+
{
17+
modules: [
18+
// Simple usage
19+
'@localsearch/nuxtjs-rollbar',
20+
21+
// With options
22+
['@localsearch/nuxtjs-rollbar', { /* module options */ }]
23+
]
24+
}
25+
```
26+
27+
## Development
28+
29+
1. Clone this repository
30+
2. Install dependencies using `yarn install` or `npm install`
31+
3. Start development server using `npm run dev`

jest.config.js

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module.exports = {
2+
collectCoverage: true,
3+
collectCoverageFrom: [
4+
'lib/**/*.ts',
5+
'!lib/plugin.ts',
6+
],
7+
moduleFileExtensions: [
8+
'ts',
9+
'js',
10+
'vue',
11+
'json',
12+
],
13+
moduleNameMapper: {
14+
'^~/(.*)$': '<rootDir>/lib/$1',
15+
'^~~$': '<rootDir>',
16+
'^@@$': '<rootDir>',
17+
'^@/(.*)$': '<rootDir>/lib/$1',
18+
},
19+
testEnvironment: 'node',
20+
testTimeout: 60000,
21+
transform: {
22+
'^.+\\.ts$': 'ts-jest',
23+
'^.+\\.js$': 'babel-jest',
24+
'.*\\.(vue)$': 'vue-jest',
25+
},
26+
};

0 commit comments

Comments
 (0)