Skip to content

Commit f656e45

Browse files
committed
chore: move to community!
1 parent e8f55c6 commit f656e45

18 files changed

+10258
-116
lines changed

.eslintrc.js

+165
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
module.exports = {
2+
extends: ['plugin:prettier/recommended'],
3+
plugins: ['prettier', '@typescript-eslint'],
4+
parser: '@typescript-eslint/parser',
5+
parserOptions: {
6+
createDefaultProgram: true,
7+
project: './tsconfig.json',
8+
},
9+
rules: {
10+
'prettier/prettier': 'warn',
11+
'@typescript-eslint/adjacent-overload-signatures': 'error',
12+
'@typescript-eslint/array-type': 'error',
13+
'@typescript-eslint/await-thenable': 'error',
14+
'@typescript-eslint/ban-types': 'off',
15+
'@typescript-eslint/class-name-casing': 'off',
16+
'@typescript-eslint/consistent-type-assertions': 'error',
17+
'@typescript-eslint/consistent-type-definitions': 'error',
18+
'@typescript-eslint/explicit-member-accessibility': [
19+
'off',
20+
{
21+
accessibility: 'explicit',
22+
},
23+
],
24+
25+
'@typescript-eslint/interface-name-prefix': 'off',
26+
'@typescript-eslint/member-delimiter-style': 'error',
27+
'@typescript-eslint/member-ordering': 'off',
28+
'@typescript-eslint/no-empty-function': 'off',
29+
'@typescript-eslint/no-empty-interface': 'off',
30+
'@typescript-eslint/no-explicit-any': 'off',
31+
'@typescript-eslint/no-floating-promises': 'off',
32+
'@typescript-eslint/no-inferrable-types': 'off',
33+
'@typescript-eslint/no-misused-new': 'off',
34+
'@typescript-eslint/no-namespace': 'off',
35+
'@typescript-eslint/no-parameter-properties': 'off',
36+
'@typescript-eslint/no-require-imports': 'off',
37+
'@typescript-eslint/no-unnecessary-qualifier': 'error',
38+
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
39+
'@typescript-eslint/no-use-before-declare': 'off',
40+
'@typescript-eslint/no-var-requires': 'off',
41+
'@typescript-eslint/prefer-for-of': 'off',
42+
'@typescript-eslint/prefer-function-type': 'error',
43+
'@typescript-eslint/prefer-namespace-keyword': 'error',
44+
'@typescript-eslint/quotes': [
45+
'error',
46+
'single',
47+
{
48+
avoidEscape: true,
49+
},
50+
],
51+
'@typescript-eslint/semi': ['error'],
52+
'@typescript-eslint/space-within-parens': ['off', 'never'],
53+
'@typescript-eslint/triple-slash-reference': 'off',
54+
'@typescript-eslint/type-annotation-spacing': 'error',
55+
'@typescript-eslint/unified-signatures': 'error',
56+
'arrow-body-style': 'error',
57+
'arrow-parens': ['off', 'as-needed'],
58+
camelcase: 'off',
59+
'capitalized-comments': 'off',
60+
complexity: 'off',
61+
'constructor-super': 'error',
62+
curly: ['error', 'multi-line'],
63+
'dot-notation': 'off',
64+
'eol-last': 'error',
65+
eqeqeq: ['error', 'smart'],
66+
'guard-for-in': 'off',
67+
'id-blacklist': ['error', 'any', 'string', 'boolean', 'Undefined'],
68+
'id-match': 'error',
69+
'sort-imports': [
70+
'error',
71+
{
72+
ignoreCase: false,
73+
ignoreDeclarationSort: true,
74+
ignoreMemberSort: false,
75+
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
76+
},
77+
],
78+
'linebreak-style': 'off',
79+
'max-classes-per-file': 'off',
80+
'max-len': [
81+
'off',
82+
{
83+
ignorePattern: '^import |^export {(.*?)}',
84+
code: 200,
85+
},
86+
],
87+
'new-parens': 'off',
88+
'newline-per-chained-call': 'off',
89+
'no-bitwise': 'off',
90+
'no-caller': 'error',
91+
'no-cond-assign': 'off',
92+
'no-console': [
93+
'off',
94+
{
95+
allow: [
96+
'log',
97+
'warn',
98+
'dir',
99+
'timeLog',
100+
'assert',
101+
'clear',
102+
'count',
103+
'countReset',
104+
'group',
105+
'groupEnd',
106+
'table',
107+
'debug',
108+
'dirxml',
109+
'error',
110+
'groupCollapsed',
111+
'Console',
112+
'profile',
113+
'profileEnd',
114+
'timeStamp',
115+
'context',
116+
],
117+
},
118+
],
119+
'no-constant-condition': 'error',
120+
'no-control-regex': 'off',
121+
'no-debugger': 'error',
122+
'no-duplicate-imports': 'error',
123+
'no-empty': 'off',
124+
'no-eval': 'off',
125+
'no-extra-semi': 'off',
126+
'no-fallthrough': 'error',
127+
'no-invalid-regexp': 'error',
128+
'no-invalid-this': 'off',
129+
'no-irregular-whitespace': 'off',
130+
'no-multiple-empty-lines': 'off',
131+
'no-new-wrappers': 'error',
132+
'no-redeclare': ['error', { builtinGlobals: false }],
133+
'no-regex-spaces': 'error',
134+
'no-return-await': 'error',
135+
'no-shadow': [
136+
'off',
137+
{
138+
hoist: 'all',
139+
},
140+
],
141+
'no-throw-literal': 'error',
142+
'no-trailing-spaces': 'error',
143+
'no-undef-init': 'error',
144+
'no-underscore-dangle': 'off',
145+
'no-unsafe-finally': 'error',
146+
'no-unused-expressions': [
147+
'error',
148+
{
149+
allowTaggedTemplates: true,
150+
allowShortCircuit: true,
151+
},
152+
],
153+
'no-unused-labels': 'error',
154+
'no-var': 'error',
155+
'object-shorthand': 'error',
156+
'one-var': ['off', 'never'],
157+
'prefer-arrow/prefer-arrow-functions': 'off',
158+
'prefer-const': 'error',
159+
'quote-props': 'off',
160+
radix: 'error',
161+
'space-before-function-paren': 'off',
162+
'use-isnan': 'error',
163+
'valid-typeof': 'off',
164+
},
165+
};

.github/issue_template.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
### Make sure to check the demo app(s) for sample usage
2+
3+
### Make sure to check the existing issues in this repository
4+
5+
### If the demo apps cannot help and there is no issue for your problem, tell us about it
6+
Please, ensure your title is less than 63 characters long and starts with a capital
7+
letter.
8+
9+
### Which platform(s) does your issue occur on?
10+
- iOS/Android/Both
11+
- iOS/Android versions
12+
- emulator or device. What type of device?
13+
14+
### Please, provide the following version numbers that your issue occurs with:
15+
16+
- CLI: (run `tns --version` to fetch it)
17+
- Cross-platform modules: (check the 'version' attribute in the
18+
`node_modules/tns-core-modules/package.json` file in your project)
19+
- Runtime(s): (look for the `"tns-android"` and `"tns-ios"` properties in the `package.json` file of your project)
20+
- Plugin(s): (look for the version numbers in the `package.json` file of your
21+
project and paste your dependencies and devDependencies here)
22+
23+
### Please, tell us how to recreate the issue in as much detail as possible.
24+
Describe the steps to reproduce it.
25+
26+
### Is there any code involved?
27+
- provide a code example to recreate the problem
28+
- (EVEN BETTER) provide a .zip with application or refer to a repository with application where the problem is reproducible.

.gitignore

+23-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
11
.idea
22
.vscode
3-
node_modules
3+
node_modules
4+
platforms
5+
hooks
6+
package-lock.json
7+
.DS_Store
8+
npm-debug.log.*
9+
demo*/app/**/*.js
10+
demo*/typings
11+
*.framework
12+
**/*.js.map
13+
src/**/*.js
14+
plugin/**/*.js
15+
plugin/**/*.d.ts
16+
bin
17+
build
18+
Pods
19+
!plugin/platforms
20+
/plugin/platforms/android/nativescript_*.aar
21+
*.xcuserdatad
22+
23+
plugin/**/*js.map
24+
plugin/**/*js
25+
/plugin/README.md

.prettierrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"printWidth": 130,
3+
"semi": true,
4+
"tabWidth": 4,
5+
"singleQuote": true
6+
}

README.md

+8-13
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
# NativeScript Insomnia
22

3-
[![NPM version][npm-image]][npm-url]
4-
[![Downloads][downloads-image]][npm-url]
5-
[![Twitter Follow][twitter-image]][twitter-url]
63

7-
[npm-image]:http://img.shields.io/npm/v/nativescript-insomnia.svg
8-
[npm-url]:https://npmjs.org/package/nativescript-insomnia
9-
[downloads-image]:http://img.shields.io/npm/dm/nativescript-insomnia.svg
10-
[twitter-image]:https://img.shields.io/twitter/follow/eddyverbruggen.svg?style=social&label=Follow%20me
11-
[twitter-url]:https://twitter.com/eddyverbruggen
4+
[npm-image]:http://img.shields.io/npm/v/nativescript-community/insomnia.svg
5+
[npm-url]:https://npmjs.org/package/nativescript-community/insomnia
6+
[downloads-image]:http://img.shields.io/npm/dm/nativescript-community/insomnia.svg
127

138
> 💡 Plugin version 2.0.0+ is compatible with NativeScript 7+. If you need to target older NativeScript versions, please stick to plugin version 1.2.3.
149
@@ -19,7 +14,7 @@ This plugin is part of the [plugin showcase app](https://github.com/EddyVerbrugg
1914
Run the following command from the root of your project:
2015

2116
```
22-
tns plugin add nativescript-insomnia
17+
tns plugin add @nativescript-community/insomnia
2318
```
2419

2520
## Usage
@@ -28,27 +23,27 @@ To use this plugin you must first require() it:
2823

2924
#### JavaScript
3025
```js
31-
var insomnia = require("nativescript-insomnia");
26+
var insomnia = require("@nativescript-community/insomnia");
3227
```
3328

3429
#### TypeScript
3530
You could do the same as in JS, but this looks fancier, right?
3631

3732
```typescript
38-
import { keepAwake, allowSleepAgain } from "nativescript-insomnia";
33+
import { keepAwake, allowSleepAgain } from "@nativescript-community/insomnia";
3934
```
4035

4136
### keepAwake
4237

43-
```js
38+
```typescript
4439
insomnia.keepAwake().then(function() {
4540
console.log("Insomnia is active");
4641
})
4742
```
4843

4944
### allowSleepAgain
5045

51-
```js
46+
```typescript
5247
insomnia.allowSleepAgain().then(function() {
5348
console.log("Insomnia is inactive, good night!");
5449
})

insomnia.android.js

-42
This file was deleted.

insomnia.ios.js

-29
This file was deleted.

lerna.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"packages": [
3+
"plugin"
4+
],
5+
"version": "2.0.0",
6+
"command": {
7+
"publish": {
8+
"conventionalCommits": true
9+
}
10+
}
11+
}

0 commit comments

Comments
 (0)