Skip to content
Open

Sandi #300

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["react-native"]
}
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ checks:
plugins:
eslint:
enabled: true
channel: "eslint-5"
channel: "eslint-4"
exclude_patterns:
- "example/"
- "**/test.js"
188 changes: 0 additions & 188 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,211 +1,23 @@
{
'parser': 'babel-eslint',

'env': {
'es6': true,
'react-native/react-native': true,
},

'plugins': [
'react',
'react-native'
],

'extends': [
'eslint:recommended',
'plugin:react/recommended',
],

'settings': {
'react': {
'version': '16.9',
},
},

'rules': {
'no-unused-vars': ['error', {
'vars': 'all',
'args': 'none',
'ignoreRestSiblings': true,
}],

'no-console': ['error'],

/*
* let foo = [1];
* let bar = [
* 1,
* ];
*/
'array-bracket-newline': ['error', 'consistent'],

/*
* let foo = [1, 2, 3];
*/
'array-bracket-spacing': ['error', 'never'],

/*
* if (foo) { bar() }
*/
'block-spacing': ['error', 'always'],

/*
* if (foo) {
* bar();
* } else {
* baz();
* }
*/
'brace-style': ['error', '1tbs', { 'allowSingleLine': true }],

/*
* let foo = [
* 1,
* ];
*/
'comma-dangle': ['error', 'always-multiline'],

/*
* let foo = [1, 2];
*/
'comma-spacing': ['error', { 'before': false, 'after': true }],

/*
* let foo,
* bar,
* baz;
*/
'comma-style': ['error', 'last'],

/*
* let foo = bar[bar];
*/
'computed-property-spacing': ['error', 'never'],

/*
* let that = this;
*/
'consistent-this': ['error', 'that'],

/*
* call();
*/
'func-call-spacing': ['error', 'never'],

/*
* function bar() { 1; }
* let bar = () => 1;
*/
'func-style': ['error', 'declaration', { 'allowArrowFunctions': true }],

/*
* foo(1);
* bar(
* 2, 3
* );
*/
'function-paren-newline': ['error', 'consistent'],

/*
* () => 1;
*/
'implicit-arrow-linebreak': ['error', 'beside'],

/*
* [
* 1
* ]
*/
'indent': ['warn', 2, { 'SwitchCase': 1 }],

/*
* <View name='foo' />
*/
'jsx-quotes': ['error', 'prefer-single'],

/*
* let foo = { bar: true };
*/
'key-spacing': ['error', { 'beforeColon': false, 'afterColon': true }],

/*
* if (foo) { return; }
*/
'keyword-spacing': ['error', { 'before': true, 'after': true }],

'linebreak-style': ['error', 'unix'],

'lines-between-class-members': ['error', 'always'],

'max-len': ['warn', { 'code': 100, 'ignoreTrailingComments': true }],

/*
* foo(1, 2, 3, 4, 5);
*/
'max-params': ['error', { 'max': 6 }],

'max-statements-per-line': ['error', { 'max': 1 }],

'new-parens': ['error'],

'no-trailing-spaces': ['error'],

'no-whitespace-before-property': ['error'],

/*
* let foo = { bar, baz };
*/
'object-curly-newline': ['error', { 'consistent': true }],
'object-curly-spacing': ['error', 'always'],
'object-property-newline': ['error', { 'allowAllPropertiesOnSameLine': true }],

/*
* let foo = 'bar'
* + 'baz';
*/
'operator-linebreak': ['error', 'before', { 'overrides': { '?': 'after', ':': 'after' } }],

/*
* 'bar'
*/
'quotes': ['warn', 'single'],

/*
* 1;
*/
'semi': ['warn', 'always'],
'semi-spacing': ['error', { 'before': false, 'after': true }],
'semi-style': ['error', 'last'],

/*
* () => {
* };
*/
'space-before-blocks': ['error', 'always'],

/*
* foo(1, 2, 3);
*/
'space-before-function-paren': ['error', {
'anonymous': 'always',
'named': 'never',
'asyncArrow': 'always',
}],

/*
* foo('bar');
*/
'space-in-parens': ['error', 'never'],

/*
* switch (a) {
* case 0: break;
* }
*/
'switch-colon-spacing': ['error', { 'after': true, 'before': false }],

'react-native/no-unused-styles': ['warn'],
'react-native/no-inline-styles': ['warn'],
},
}

Expand Down
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
example
coverage
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
os: osx
language: node_js

node_js:
- "stable"
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import TextField from './src/components/field';
import FilledTextField from './src/components/field-filled';
import OutlinedTextField from './src/components/field-outlined';

export { TextField, FilledTextField, OutlinedTextField };
export { TextField };
32 changes: 14 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-material-textfield",
"version": "0.16.1",
"version": "0.12.0",
"license": "BSD-3-Clause",
"author": "Alexander Nazarov <[email protected]>",

Expand All @@ -21,7 +21,6 @@
],

"main": "index.js",
"files": ["index.js", "src/*", "license.txt", "readme.md", "changelog.md"],

"repository": {
"type": "git",
Expand All @@ -33,28 +32,25 @@
},

"peerDependencies": {
"react": ">=16.3.0",
"react-native": ">=0.55.0"
"react": "*",
"react-native": "*"
},

"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/runtime": "^7.5.5",
"babel-eslint": "^10.0.0",
"babel-jest": "^24.9.0",
"eslint": "^6.5.0",
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-react-native": "^3.7.0",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.56.0",
"react": "16.10.2",
"react-native": "0.61.2",
"react-test-renderer": "16.10.2"
"babel-eslint": "^8.0.0",
"babel-jest": "^22.0.0",
"babel-preset-react-native": "4.0.0",
"eslint": "^4.6.0",
"eslint-plugin-react": "^7.0.0",
"jest": "^22.0.0",
"react": "16.2.0",
"react-native": "0.52.0",
"react-test-renderer": "16.2.0"
},

"scripts": {
"test": "eslint index.js src && jest --silent",
"lint": "eslint index.js src example/app.js",
"test": "npm run lint && npm run jest -- --silent",
"lint": "eslint src example/app.js",
"jest": "jest"
},

Expand Down
Loading