Skip to content
Merged
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
58 changes: 58 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
module.exports = {
'env': {
'browser': true,
'es6': true,
'node': true
},
'extends': [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended'
],
'parser': '@typescript-eslint/parser',
'parserOptions': {
'ecmaVersion': 2015,
'sourceType': 'module'
},
'plugins': [
'react',
'@typescript-eslint',
'import'
],
'rules': {
'indent': ['error', 2, { 'SwitchCase': 1 }],
'quotes': ['warn', 'single', 'avoid-escape'],
'linebreak-style': ['error', 'unix'],
'camelcase': ['error', { 'properties': 'never' }],
'no-use-before-define': ['error', 'nofunc'],
'eol-last': ['error', 'always'],
'keyword-spacing': 'error',
'no-trailing-spaces': 'error',
'space-before-function-paren': ['error', {'named': 'never'}],
'react/display-name': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { 'argsIgnorePattern': '^_' }],
},
'overrides': [{
'files': ['src/**/*.ts', 'src/**/*.tsx'],
'excludedFiles': ['src/**/__tests__/**'],
'extends': [
'plugin:compat/recommended'
],
'settings': {
'polyfills': [
'Promise' // required as a polyfill by the user
]
},
'rules': {
'no-restricted-syntax': ['error', 'ForOfStatement', 'ForInStatement'],
'compat/compat': ['error', 'defaults, not ie < 11'],
'no-throw-literal': 'error',
'import/no-self-import': 'error',
// 'import/no-default-export': 'error', // Default exports are a common practice in React
}
}]
}
7 changes: 6 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.8.2 (April 3, 2023)
- Updated linter dependencies and rules. The deprecated TSLint package was replaced by ESLint.
- Updated some transitive dependencies for vulnerability fixes.
- Updated @splitsoftware/splitio package to version 10.22.4 that includes minor improvements.

1.8.1 (December 16, 2022)
- Updated some transitive dependencies for vulnerability fixes.
- Bugfixing - Upgrade @splitsoftware/splitio dependency to version 10.22.3 which includes a memory leak fix for localhost mode (Related to issue https://github.com/splitio/javascript-commons/issues/181) among other improvements.
Expand Down Expand Up @@ -64,7 +69,7 @@
- Updated Split's SDK package for vulnerability fixes.

1.2.4 (February 11, 2021)
- Updated CommonJS and ES Modules builds to always resolve browser modules of the Javascript SDK and avoid issues when using Node-based testing framework such as Jest (issues #13, #34).
- Updated CommonJS and ES Modules builds to always resolve browser modules of the JavaScript SDK and avoid issues when using Node-based testing framework such as Jest (issues #13, #34).

1.2.3 (February 8, 2021)
- Updated React peer dependency range to include React@17.x.x.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright © 2022 Split Software, Inc.
Copyright © 2023 Split Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ Split has built and maintains SDKs for:
* GO [Github](https://github.com/splitio/go-client) [Docs](https://help.split.io/hc/en-us/articles/360020093652-Go-SDK)
* iOS [Github](https://github.com/splitio/ios-client) [Docs](https://help.split.io/hc/en-us/articles/360020401491-iOS-SDK)
* Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)
* Javascript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
* Javascript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
* JavaScript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
* JavaScript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
* Node [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
* PHP [Github](https://github.com/splitio/php-client) [Docs](https://help.split.io/hc/en-us/articles/360020350372-PHP-SDK)
* Python [Github](https://github.com/splitio/python-client) [Docs](https://help.split.io/hc/en-us/articles/360020359652-Python-SDK)
Expand Down
12 changes: 8 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ module.exports = {

testEnvironment: 'jsdom',

setupFilesAfterEnv: ['./setupTests.js'],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.jest.json',
}
},

// Test files are .js, .jsx, .ts and .tsx files inside of __tests__ folders and with a suffix of .test or .spec
testMatch: [ "**/__tests__/**/?(*.)+(spec|test).[jt]s?(x)" ],
testMatch: ['**/__tests__/**/?(*.)+(spec|test).[jt]s?(x)'],

// Included files for test coverage (npm run test:coverage)
collectCoverageFrom: [
"src/**/*.{js,jsx,ts,tsx}",
"!src/__tests__/**",
'src/**/*.{js,jsx,ts,tsx}',
'!src/__tests__/**',
]
};
Loading